Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install error #83

Closed
sahil28v opened this issue Mar 24, 2016 · 4 comments
Closed

npm install error #83

sahil28v opened this issue Mar 24, 2016 · 4 comments

Comments

@sahil28v
Copy link

npm install shows this while installation---

npm WARN prefer global [email protected] should be installed with -g

[email protected] install ....../react-slingshot/node_modules/fsevents
node-pre-gyp install --fallback-to-build

sh: node-pre-gyp: command not found
npm WARN install:[email protected] [email protected] install: node-pre-gyp install --fallback-to-build
npm WARN install:[email protected] spawn ENOENT

Then, npm start gives this error-
sh: rimraf: command not found

npm ERR! Darwin 15.2.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "remove-dist"
npm ERR! node v5.9.1
npm ERR! npm v3.7.3
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] remove-dist: rimraf ./dist
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] remove-dist script 'rimraf ./dist'.

I tried installing the older version of node and npm , also tried uninstalling and reinstalling nodejs, but didn't work. Also tried running npm install after -- sudo npm install node-gyp node-pre-gyp, didn't work.....

Can you please help.

System is Mac, OS: el capitan

@coryhouse
Copy link
Owner

Odd. I'm unable to reproduce this running Node 5.9.1 npm 3.7.3 on Mac OS El Capitan. Perhaps running this first would help? npm install -g node-gyp.

Based on mapbox/node-pre-gyp#156

@sahil28v
Copy link
Author

Tried that ,but still get this back while doing npm install ---
node-pre-gyp install --fallback-to-build

sh: node-pre-gyp: command not found
npm WARN install:[email protected] [email protected] install: node-pre-gyp install --fallback-to-build
npm WARN install:[email protected] spawn ENOENT

I tried the same on my windows pc where everything works fine.
I think the problem has started lately with node and npm on my mac -- but re-installing them both didn't work as well.

Some blogs mentioned - installing node via home brew could mess up path variable , but although I did install home brew lately , I didn't use it to install node at all.
Also my echo $PATH returns this /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin -- don't know if this is showing up correctly.

Kinda stuck on what shall I do next to rectify this.

Anyways , thanks for the reply @coryhouse , appreciate your help

@coryhouse
Copy link
Owner

It's clearly a machine specific issue since we're running the exact same setup. I think you're on the right track looking into PATH issues. Does this same issue occur if you try to install node-pre-gyp all by itself?

https://www.npmjs.com/package/node-pre-gyp

I suspect solving why that install doesn't work will lead to your issue.

@sahil28v
Copy link
Author

@coryhouse -- its working now.

All I did after endless trials was uninstalling npm, rollback to node 4.4 -> try again ( Didn't work) -- then I updated nodejs to its latest version again , with it updating npm.----- Now it works.(No idea why though)

thanks for taking out the time to reply .

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

No branches or pull requests

2 participants