Closed teppeis closed 9 years ago
After this error, symlink has been made but the path is not correct.
$ ll ~/.nodebrew/current/lib/node_modules/
lrwxr-xr-x 1 teppeis staff 15 11 25 10:23 foo@ -> ../../../../foo
I'm also having same issue. nodebrew 0.7.5
$ npm link
npm ERR! Darwin 14.0.0
npm ERR! argv "node" "/Users/tgfjt/.nodebrew/current/bin/npm" "link"
npm ERR! node v0.10.32
npm ERR! npm v2.1.7
npm ERR! path /Users/tgfjt/.nodebrew/current/lib/node_modules/generator-foobar/package.json
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! ENOENT, open '/Users/tgfjt/.nodebrew/current/lib/node_modules/generator-foobar/package.json'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /Users/tgfjt/workspace/boxbox/generator-foobar/npm-debug.log
same problem :(
How about updating npm version to run npm install -g npm
?
It seems to go well:
$ npm install -g npm
$ node -v && npm -v
v0.10.32
2.7.4
$ mkdir foo && cd foo
$ npm init
...
$ npm link
nope, I already have npm@2.7.4
.
@watilde reproduced in npm@2.7.4 and node@0.12.0
npm ERR! Darwin 14.1.0
npm ERR! argv "node" "/Users/teppei/.nodebrew/current/bin/npm" "link"
npm ERR! node v0.12.0
npm ERR! npm v2.7.3
npm ERR! path /Users/teppei/.nodebrew/current/lib/node_modules/foo/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! enoent ENOENT, open '/Users/teppei/.nodebrew/current/lib/node_modules/foo/package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /Users/teppei/tmp/foo/npm-debug.log
@deepsweet @teppeis thanks a lot for your tests, I've reported to npm/npm!
@watilde Thank you for supporting!
@hokaccha umm..it might should to make the same depth of path between node/version
and current
for fixing this issue.
current:
.nodebrew
- current: symlink
- node
-version
fixed idea:
.nodebrew
- current
- node: symlink
- node
- version
refs the test case: https://github.com/npm/npm/pull/7730
(๑˃̵ᴗ˂̵)و Seems to fix for now on npm@2.7.5 by https://github.com/npm/npm/pull/7751
yeah, works fine for me :+1:
Thank you everyone!
:clap: