Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

npm@3 confused by linked packages #9517

Open
othiym23 opened this issue Sep 7, 2015 · 4 comments
Open

npm@3 confused by linked packages #9517

othiym23 opened this issue Sep 7, 2015 · 4 comments

Comments

@othiym23
Copy link
Contributor

othiym23 commented Sep 7, 2015

After a mostly successful install against a project that includes two scoped packages that were originally installed with npm i -S and then replaced with npm link @packard/model and npm link @nothingness/level, I ran npm i -D tap --node-gyp=pangyp and got the following at the very end of what looked like an otherwise successful install process (the tree had printed out and everything):

npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/iojs" "/usr/local/bin/npm" "i" "-D" "tap" "--node-gyp=pangyp"
npm ERR! node v2.5.0
npm ERR! npm  v3.3.2
npm ERR! path /Users/ogd/Documents/projects/packard-cache/node_modules/escodegen/node_modules/esprima/bin/esparse.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/ogd/Documents/projects/packard-cache/node_modules/escodegen/node_modules/esprima/bin/esparse.js'
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/ogd/Documents/projects/packard-cache/npm-debug.log

[full npm-debug.log]

I'm not sure what's going on here and will keep digging, but am logging it here in the hopes that @iarna will have a better idea than I do.

@othiym23 othiym23 added the bug label Sep 7, 2015
@othiym23 othiym23 added this to the 3.x milestone Sep 7, 2015
@othiym23
Copy link
Contributor Author

othiym23 commented Sep 8, 2015

After the above, when I went to the home directory for the linked copy of @nothingness/level, and ran npm ls, to mixed results. Trying to fix the tree with npm install ended in a crash. I would expect npm to leave the node_modules in a linked package in a self-consistent state, even if it decides to rummage around in it. At the very least, this would mean that multiple packages linking to the same dependency would constantly be causing it to churn, and it wouldn't be in a usable state on its own, which could be an issue if it exported binaries.

@othiym23
Copy link
Contributor Author

othiym23 commented Sep 8, 2015

This will be addressed by the fix to #9519.

@othiym23 othiym23 changed the title npm@3 confused by linked (scoped?) packages npm@3 confused by linked packages Sep 8, 2015
@othiym23
Copy link
Contributor Author

othiym23 commented Sep 8, 2015

And the bits that aren't addressed by #9519 will be addressed by the fix to #9285.

@dasilvacontin
Copy link

Got a similar trace:

➜  human-sort git:(master) npm i -g @dasilvacontin/human-sort
npm ERR! Darwin 14.5.0
npm ERR! argv "/Users/dasilvacontin/.nvm/versions/node/v5.10.1/bin/node" "/Users/dasilvacontin/.nvm/versions/node/v5.10.1/bin/npm" "i" "-g" "@dasilvacontin/human-sort"
npm ERR! node v5.10.1
npm ERR! npm  v3.8.3
npm ERR! path /Users/dasilvacontin/.nvm/versions/node/v5.10.1/lib/node_modules/@dasilvacontin/human-sort/bin/human-sort.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/dasilvacontin/.nvm/versions/node/v5.10.1/lib/node_modules/@dasilvacontin/human-sort/bin/human-sort.js'
npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/dasilvacontin/.nvm/versions/node/v5.10.1/lib/node_modules/@dasilvacontin/human-sort/bin/human-sort.js'
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/dasilvacontin/GitHub/dasilvacontin/human-sort/npm-debug.log

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants