You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Noticed with 0.23.2, io.js 1.0.4 ; when I try to run npm config edit --global npm tries to spawn vim on ${NVM_PATH}/../../etc/npmrc ; but since the etc subdirectory of v1.0.4 does not exists, npm writes an unpleasant error message:
$ npm config edit --global
npm ERR! Darwin 14.1.0
npm ERR! argv "node" "/Users/smikes/.nvm/versions/io.js/v1.0.4/bin/npm" "config" "edit" "--global"
npm ERR! node v1.0.4
npm ERR! npm v2.3.0
npm ERR! path /Users/smikes/.nvm/versions/io.js/v1.0.4/etc/npmrc.c33db61dc6e13a89a2ab11f8f1793b9e
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! enoent ENOENT, open '/Users/smikes/.nvm/versions/io.js/v1.0.4/etc/npmrc.c33db61dc6e13a89a2ab11f8f1793b9e'
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/smikes/src/github/npm-kludge-search/npm-debug.log
See issue npm/npm#7233 (for improving the npm error message); this case requests that the etc/ directory be created on install.
The text was updated successfully, but these errors were encountered:
I see no problem with nvmmkdir -ping that directory, but I don't understand why npm isn't doing that itself. Or is that something that the node/iojs installer is supposed to be doing?
I would put this on the installer. In general I expect that if <path>/bin/node exists and <path>/lib exists that it's reasonable that <path>/etc also should exist; that feels like a Unix convention even if it's not in any standard.
However, if npm creates the lib directory then I would be convinced the other day. I think npm expects the binlib and etc directories to already exist when it installs a global package. (Possibly man too...)
nvm does nothing except run the node/iojs installer - so I think it's a combo issue:
the node/iojs installer may need to create the etc dir
npm should absolutely create the dir it needs when attempting to edit a config file
I'm not convinced it's a good idea to add && mkdir -p "$(nvm_version_path "$(nvm current)")/etc" to the install (or perhaps use) code path. While it would solve your issue for nvm, I'm not sure it's the right place to solve it.
I agree with your points above. nvm does have the best leverage to address this bug across both io.js/node and across various npm versions, but it really isn't in any way an nvm bug.
Noticed with 0.23.2, io.js 1.0.4 ; when I try to run
npm config edit --global
npm tries to spawnvim
on ${NVM_PATH}/../../etc/npmrc ; but since theetc
subdirectory ofv1.0.4
does not exists, npm writes an unpleasant error message:See issue npm/npm#7233 (for improving the
npm
error message); this case requests that theetc/
directory be created on install.The text was updated successfully, but these errors were encountered: