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

Upon using starter, error: command failed: npm install #2

Open
victorkane opened this issue Jun 28, 2019 · 3 comments
Open

Upon using starter, error: command failed: npm install #2

victorkane opened this issue Jun 28, 2019 · 3 comments

Comments

@victorkane
Copy link

victorkane commented Jun 28, 2019

Hi there. Upon using starter we get the following error (on Ubuntu 18.04):

> [email protected] install /home/reactpathways/demystifying-react/react-bootstrap-starter/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

  Error: Command failed: npm install

  - index.js:236 Promise.all.then.arr
    [lib]/[gatsby]/[gatsby-cli]/[execa]/index.js:236:11

  - next_tick.js:68 process._tickCallback
    internal/process/next_tick.js:68:7
@victorkane
Copy link
Author

Additional info.

If I do:

rm -rf node_modules
rm package-lock.json

npm install

I get:

> [email protected] install /home/reactpathways/demystifying-react/react-bootstrap-starter/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

and the install process abruptly stops.

If I attempt to run, it's the sharp package that is missing:

gatsby develop

success open and validate gatsby-configs - 0.049 s

Something went wrong installing the "sharp" module

Cannot find module '../build/Release/sharp.node'

- Remove the "node_modules/sharp" directory, run "npm install" and look for errors
- Consult the installation documentation at https://sharp.pixelplumbing.com/en/stable/install/
- Search for this error at https://github.com/lovell/sharp/issues

⠋ load plugins

@I-keep-trying
Copy link

I got it working, but I changed a few things without checking in-between so I'm not sure exactly which thing it was that did the trick... So un-scientific of me 😣

I edited package.json as follows:

Removed line 3 - "private": true,
Edited the develop script from gatsby develop -H 0.0.0.0 -p 8000 to just gatsby develop

Updated "gatsby": "^2.3.34" to "gatsby": "^2.13.67"

Removed yarn.lock entirely. People say you're not supposed to, but idk why. In a different repo I had, it was causing security vulnerabilities, and when I simply removed it, the vulnerabilities were solved and everything worked fine. In this repo, I removed it proactively and everything works.

I am using node version 10.16.2, on Windows, 10 v1903.

@b1scuit
Copy link

b1scuit commented Mar 26, 2020

I found just removing the yarn.lock enough to get this up and going again

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

3 participants