npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fixmynode

v0.0.4

Published

fixes file permissions on shitty node installations

Downloads

4

Readme

Fixmynode - Fixes the permisssions on your node installation on OSX.

NPM

Install with:

npm install -g fixmynode

Do you constantly get this annoying error?

npm ERR! Error: EACCES, open '/Users/YOUR_USERNAME/.npm/-/all/.cache.json'
npm ERR!  { [Error: EACCES, open '/Users/YOUR_USERNAME/.npm/-/all/.cache.json']
npm ERR!   errno: 3,
npm ERR!   code: 'EACCES',
npm ERR!   path: '/Users/YOUR_USERNAME/.npm/-/all/.cache.json' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Darwin 12.2.0
npm ERR! command "node" "/usr/local/bin/npm" "search" "bower"
npm ERR! cwd /Users/YOUR_USERNAME
npm ERR! node -v v0.10.4
npm ERR! npm -v 1.2.18
npm ERR! path /Users/YOUR_USERNAME/.npm/-/all/.cache.json
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, open '/Users/YOUR_USERNAME/.npm/-/all/.cache.json'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/YOUR_USERNAME/npm-debug.log
npm ERR! not ok code 0

It whines at you, "Please try running this command again as root/Administrator." So you constantly have to run your node commands as 'sudo' and plug in your password. Sucks right?

There could be a permissions problem on your ~/.npm directory. For users who don't know what'~' means, it's a shorthand for /Users/YOUR_USERNAME/ (the 'home' directory) where the first '/' is your root directory. The full path to your '~/.npm' directory is '/Users/YOUR_USERNAME/.npm'; it stores various npm functionality. The easiest way to get to your home directory on a unix based system is to type 'cd'. This goes to home sweet home. I make this file belong to the user who runs the command and I set the group id to 'admin.'

There could also a permissions problem on your /usr/local/lib/node_modules. This is where npm tries to store your globally installed modules. It is the system level version of the 'node_modules' folder you find in basically any project you make and install with dependencies. I make this file belong to the user running the command; the group id is set to 'admin.''

Usage - Solve Yo Problems, AKA intro was TLDR

Run:

sudo fixmynode
Password:TYPE_YO_PASSWORD

That's it; you're done. That will fix the two permissions problems above and from now on out you should be able to use:

npm install SOME_MODULE
//or
npm install -g SOME_MODULE

without having to type in 'sudo' and your password every time.

The Future

Maybe someone who knows how to work one of the machines called "Windows" can fork me? I doubt this works on a windows system as is. The 'userid' dependency of my module also doesn't work for windows. So you won't be able to set the proper IDs on both folders.

Moral Support

If something goes wrong on your system with node and you need help figuring it out and my package isn't working as intended or at all I'm almost always available on my twitter handle @yvanscher. Hit me up and we'll try and fix your system; I'm no expert but we can probably solve it together.