billyjacoby/gatsby-react-bootstrap-starter

Upon using starter, error: command failed: npm install

Opened this issue · 3 comments

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

> sharp@0.22.1 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

Additional info.

If I do:

rm -rf node_modules
rm package-lock.json

npm install

I get:

> sharp@0.22.1 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 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.

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