Skip to content


Subversion checkout URL

You can clone with
Download ZIP


npm link ends with ENOENT error #440

sbrandt opened this Issue · 3 comments

4 participants



I´m trying to build some custom rules. Therefore I followed the instructions under But when I want to test my changes following the node workflow and run:

sudo npm link (in the build/npm dir) 

to link it to my node installation I get the following error:

Error: ENOENT, chmod '/usr/local/lib/node_modules/csslint/cli.js'


ls -l /usr/local/lib/node_modules/  

shows that the symbolic link points to the main csslint directory:


instead of


so it could not find the cli.js file.

I think the problem is in package.json where the path to the binary is defined as:

"bin": {
    "csslint": "./cli.js"

But I´m very new to npm so im not really sure.

A workaround that works for me is to to copy the package.json from the main directory to the build/npm/ directory before running "sudo npm link".

But I´m sure there is a better way to fix it. Thanks for helping me out!



I had the same problem, but running npm link in release/npm instead of build/npm seems to be the way to do it.


Works for me! Thank you. I modified the documentation in the wiki accordingly.

@sbrandt sbrandt closed this

With today's master c59f2e5 I'm not having much success.

"grunt release" seems to create all the new stuff in "release/build" directory, instead of "release/". This is the state of the repository after "grunt release", which doesn't look right to me:

csslint.git $ [git:master+] git status
On branch master
Your branch is up-to-date with 'origin/master'.

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   CHANGELOG
    modified:   package.json
    deleted:    release/csslint-node.js
    deleted:    release/csslint-rhino.js
    deleted:    release/csslint-tests.js
    deleted:    release/csslint-worker.js
    deleted:    release/csslint-wsh.js
    deleted:    release/csslint.js
    deleted:    release/npm/cli.js
    deleted:    release/npm/lib/csslint-node.js
    modified:   release/npm/package.json

This ended up working right

$ cp release/npm/package.json release/build/npm/
$ cd release/build/npm/
$ sudo npm link
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.