ignite: install fails on global install
Hiya! So you think it’s broken or missing a feature eh?
Welllllll, it just might be. Do me a favor and check the following.
- [ x ] Issue does not already exist
- Identify exactly what aspect your issue is about
- [x ] ignite base application
- ignite the cli
- ignite generated code
I’ve tried reinstalling node from homebrew, and have cleaned out ~/.node and ~/.npm
Then when it fails to install a specific module, i try to install that individually, and eventually end up in the same place:
Here’s the command line output: (Problem with duplexer so I install that directly sudo npm install -g duplexer
npm ERR! Darwin 14.5.0 npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “i” “-g” “generator-react-native-ignite” npm ERR! node v6.2.2 npm ERR! npm v3.8.6 npm ERR! path /Users/selly/.npm/duplexer2/0.0.2/package.tgz.868533109 npm ERR! code EACCES npm ERR! errno -13 npm ERR! syscall open
npm ERR! Error: EACCES: permission denied, open ‘/Users/selly/.npm/duplexer2/0.0.2/package.tgz.868533109’ npm ERR! at Error (native) npm ERR! { Error: EACCES: permission denied, open ‘/Users/selly/.npm/duplexer2/0.0.2/package.tgz.868533109’ npm ERR! at Error (native) npm ERR! errno: -13, npm ERR! code: ‘EACCES’, npm ERR! syscall: ‘open’, npm ERR! path: ‘/Users/selly/.npm/duplexer2/0.0.2/package.tgz.868533109’, npm ERR! parent: ‘multipipe’ } npm ERR! npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request: npm ERR! /usr/local/lib/node_modules/react-native-ignite/npm-debug.log /usr/local/lib └── (empty)
npm ERR! Darwin 14.5.0 npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” “-g” “react-native-ignite” npm ERR! node v6.2.2 npm ERR! npm v3.8.6 npm ERR! code ELIFECYCLE
npm ERR! react-native-ignite@1.1.0 postinstall: npm i -g generator-react-native-ignite
npm ERR! Exit status 243
npm ERR!
npm ERR! Failed at the react-native-ignite@1.1.0 postinstall script ‘npm i -g generator-react-native-ignite’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the react-native-ignite package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm i -g generator-react-native-ignite
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs react-native-ignite
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls react-native-ignite
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! /Users/selly/npm-debug.log
Then I get this
react-native-ignite@1.1.0 postinstall /usr/local/lib/node_modules/react-native-ignite npm i -g generator-react-native-ignite
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/generator-react-native-ignite /usr/local/lib └── generator-react-native-ignite@1.1.0
npm ERR! Darwin 14.5.0 npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “i” “-g” “generator-react-native-ignite” npm ERR! node v6.2.2 npm ERR! npm v3.8.6 npm ERR! path /usr/local/lib/node_modules/generator-react-native-ignite npm ERR! code EACCES npm ERR! errno -13 npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules/generator-react-native-ignite’ npm ERR! at Error (native) npm ERR! { Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules/generator-react-native-ignite’ npm ERR! at Error (native) npm ERR! errno: -13, npm ERR! code: ‘EACCES’, npm ERR! syscall: ‘access’, npm ERR! path: ‘/usr/local/lib/node_modules/generator-react-native-ignite’ } npm ERR! npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request: npm ERR! /usr/local/lib/node_modules/react-native-ignite/npm-debug.log /usr/local/lib └── (empty)
npm ERR! Darwin 14.5.0 npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” “-g” “react-native-ignite” npm ERR! node v6.2.2 npm ERR! npm v3.8.6 npm ERR! code ELIFECYCLE
npm ERR! react-native-ignite@1.1.0 postinstall: npm i -g generator-react-native-ignite
npm ERR! Exit status 243
npm ERR!
npm ERR! Failed at the react-native-ignite@1.1.0 postinstall script ‘npm i -g generator-react-native-ignite’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the react-native-ignite package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm i -g generator-react-native-ignite
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs react-native-ignite
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls react-native-ignite
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! /Users/selly/npm-debug.log npm ERR! code 1 jarvis:~ selly$
But then you take a look (i’ve already chmod777’ed it):
jarvis:~ selly$ ll /usr/local/lib/node_modules/ total 0 drwxrwxrwx 7 selly wheel 238B Jun 30 11:35 .
Then I get something like this sometimes:
`` Here’s the error I’m getting at the end of npm-debug.log:
56447 silly lifecycle react-native-ignite@1.1.0~postinstall: Args: [ ‘-c’, ‘npm i -g generator-react-native-ignite’ ]
56448 silly lifecycle react-native-ignite@1.1.0~postinstall: Returned: code: 243 signal: null
56449 info lifecycle react-native-ignite@1.1.0~postinstall: Failed to exec postinstall script
56450 verbose unlock done using /Users/selly/.npm/_locks/staging-3a08f0df5026584d.lock for /usr/local/lib/node_modules/.staging
56451 silly rollbackFailedOptional Starting
56452 silly rollbackFailedOptional Finishing
56453 silly runTopLevelLifecycles Starting
56454 silly runTopLevelLifecycles Finishing
56455 silly install printInstalled
56456 verbose stack Error: react-native-ignite@1.1.0 postinstall: npm i -g generator-react-native-ignite
56456 verbose stack Exit status 243
56456 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:239:16)
56456 verbose stack at emitTwo (events.js:106:13)
56456 verbose stack at EventEmitter.emit (events.js:191:7)
56456 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
56456 verbose stack at emitTwo (events.js:106:13)
56456 verbose stack at ChildProcess.emit (events.js:191:7)
56456 verbose stack at maybeClose (internal/child_process.js:852:16)
56456 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
56457 verbose pkgid react-native-ignite@1.1.0
56458 verbose cwd /Users/selly
56459 error Darwin 14.5.0
56460 error argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” “-g” “react-native-ignite”
56461 error node v6.2.2
56462 error npm v3.8.6
56463 error code ELIFECYCLE
56464 error react-native-ignite@1.1.0 postinstall: npm i -g generator-react-native-ignite
56464 error Exit status 243
56465 error Failed at the react-native-ignite@1.1.0 postinstall script ‘npm i -g generator-react-native-ignite’.
56465 error Make sure you have the latest version of node.js and npm installed.
56465 error If you do, this is most likely a problem with the react-native-ignite package,
56465 error not with npm itself.
56465 error Tell the author that this fails on your system:
56465 error npm i -g generator-react-native-ignite
56465 error You can get information on how to open an issue for this project with:
56465 error npm bugs react-native-ignite
56465 error Or if that isn’t available, you can get their info via:
56465 error npm owner ls react-native-ignite
56465 error There is likely additional logging output above.
56466 verbose exit [ 1, true ]
``
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 2
- Comments: 17 (4 by maintainers)
i managed to fix this issue by following this guide: https://docs.npmjs.com/getting-started/fixing-npm-permissions
+1 on this issue, but I have a workaround/better practice solution. It all boils down to attempting to use npm as a system (root) package manager - DON’T. It breeds permission issues. Also, do you trust every postinstall script in the entire dependency tree to run as root? What you probably want is a user-specific NPM prefix for all your global installs to go under. That way,
npm install -gactually works without sudo or janky security-breaking recursivechowns.Here’s how I fixed it:
Add to
~/.bashrcor similar:Now
npm install -g react-native-igniteworks!For posterity, here’s the exact issue I was seeing, even running under a root login shell:
I’m sure we can. Might want to create a ticket @jamonholmgren