Closed bep closed 6 years ago
sh: node-gyp: command not found
Try updating your node version to latest stable8.11.3
and let us know what happens.
https://nodejs.org/en/
I downgraded Node from v9.3.0 to 8.11.3 and that builds.
I think this needs a more prominent place in your starter guides.
It doesn't seem like a node version problem. Just that somehow node-gyp wasn't installed before.
It doesn't seem like a node version problem. Just that somehow node-gyp wasn't installed before.
It certainly was a problem with my node installation. I followed your quick start, and it goes right into "npm install ...". It would make it easier for the end user if you added a note about prerequisite requirements (Node v?)
Node 9 should work afaik is what I mean. Would you mind switching back to node 9 and trying again just to double-check?
I run Node v 10.7.0 and also encounter problems installing Sharp. Both trying to install the gatsby-starter-blog and a regular npm install sharp
gives the same problem of seeming to download Sharp indefinetely.
Edit: I downgraded to Node v8.11.3 but unlike @bep, I still can't install Sharp.
Would you mind switching back to node 9 and trying again just to double-check?
Brew doesn't have an (easy) way to install Node 9 anymore. But since @brotzky 's first instinctive response was to try Node 8, it tells me that this isn't the first. I would think that some text about the runtime needed to run Gatsby would be ... useful. And possible also use that/those runtimes in the CI build to verify the setup.
NPM packages w/ binary dependencies are unfortunately notoriously buggy to install in Node. We get issues around installing sharp every so often and the only fix unfortunately is generally to remove the node_modules
directory and try again.
@brotzky's advice wasn't about node 8 vs 9 per se — it was just that something was clearly goofy with your node install. I've used Node 6/7/8/9/10 with Gatsby w/o troubles. We do test on Node 6, 8, and 10.