I've ran into a problem after doing a clean install of this project. npm run dev
failed with:
⠂ source and transform .../www/node_modules/bluebird/js/release/async.js:61
fn = function () { throw arg; };
^
Error: Cannot find module '../build/Release/sharp.node'
Looked like a dependency was missing. (I'm not sure why sharp didn't install initially, given it is listed as a dependency of gatsby-plugin-sharp.) Either way, I manually installed it (npm i --save sharp
) and re-ran npm run dev
. This time it failed with:
⠂ source and transform .../www/node_modules/bluebird/js/release/async.js:61
fn = function () { throw arg; };
^
Error: .../www/node_modules/sharp/build/Release/sharp.node, 1): Library not loaded: @rpath/libvips-cpp.42.dylib
Referenced from: .../www/node_modules/sharp/build/Release/sharp.node
Reason: Incompatible library version: sharp.node requires version 50.0.0 or later, but libvips-cpp.42.dylib provides version 49.0.0
I'm not familiar with either of these dependencies- but I looked at the gatsby-plugin-sharp package.json
file and saw it was depending on sharp ^0.17.3. My locally installed sharp was 0.18.12. This should be compatible but I decided to downgrade to 0.17.3 anyway and after doing so- the errors above went away.
Edit 1: It looks like any of the 0.18.* versions fail with a node-gyp
error. Perhaps this failure causes the install to fail silently for some reason, which may be why sharp is missing after a fresh install. Maybe you want to remove the "^" from your version specifier?
Unfortunately npm run dev
now seems to consume a lot of memory and hang after the following:
$ npm run dev > react-website@0.0.1 dev /Users/bvaughn/Documents/git/react/www > gatsby develop success open and validate gatsby-config.js — 0.006 s success copy gatsby files — 0.023 s ⠁ source and transform nodesWarning: No slug found for "README.md". Falling back to default "/README.html". Warning: No slug found for "index.md". Falling back to default "/index.html". success source and transform nodes — 1.433 s success building schema — 0.441 s success createLayouts — 0.021 s success createPages — 0.430 s success createPagesStatefully — 0.027 s success extract queries from components — 0.192 s success run graphql queries — 9.198 s success write out page data — 0.017 s success update schema — 62.771 s bootstrap finished, time since started: 76.526 s ### Hung here for at least a couple of minutes. ### Terminal is unresponsive (even to Ctrl+C).
Next I tried uninstalling gatsby-transformer-sharp and gatsby-plugin-sharp and removing them from my gatsby-config
. After doing this, npm run dev
worked (in that it quickly spun up an HTTP server, although the remark plugin logged an error about the missing sharp plugin).
Then I tried re-adding gatsby-transformer-sharp (npm i --save gatsby-transformer-sharp
) and I was still able to start the dev-server.
Lastly I tried re-adding gatsby-plugin-sharp (npm i --save gatsby-plugin-sharp
) and the dev server now hangs instead of starting up.
Any chance you have an idea what might be going on? Any debug/log output I could provide that might shed some light?
Edit 2: For what it's worth, I tried stepping Node down from 8.2.1 to 7.9.0 (another version I had installed) and re-npm-installing. (It seemed worth trying because this was the version of Node I was using a few weeks ago, when I first setup the Gatbsy site.) And sure enough, the server no longer hung after that- although things still look funky. I will keep investigating this and update the issue with my findings.
Edit 3: I'm losing my mind 😅 I did another clean install and now the dev server started up okay. Something seems to be going on with my machine, given the indeterminate behavior here, so I'm going to close this issue. I may still update it with my findings if I'm able to get to the bottom of this is a satisfactory manor.
BrandTurner and averybuehlerBrandTurner
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4