Closed SeifESlimene closed 1 year ago
I have not tried the installation with latest node 15 version. It may be due that. Can you delete package-lock.json and node-modules folder, run npm update and install again.
I was able to test it now. I switched back my node version to version 10(v10.13.0 to be specific). I tried starting the app(npm start
). It gave back the sharp module error. Then, I removed the node_modules folder. Ran install (npm install
) again. This time it worked. I switched to node version 11. I tried running the app. It gave the error below:
❯ nvm use 11
Now using node v11.0.0 (npm v6.4.1)
❯ node -v
v11.0.0
❯ npm start
> gatsby-starter-hello-world@0.1.0 start /Volumes/Work files/dev/github/basukala.me
> npm run develop
> gatsby-starter-hello-world@0.1.0 develop /Volumes/Work files/dev/github/basukala.me
> gatsby develop
success open and validate gatsby-configs - 0.019s
success load plugins - 0.382s
success onPreInit - 0.021s
success initialize cache - 0.005s
success copy gatsby files - 0.056s
success onPreBootstrap - 0.014s
success createSchemaCustomization - 0.001s
success Checking for changed pages - 0.000s
success source and transform nodes - 0.030s
success building schema - 0.194s
info Total nodes: 24, SitePage nodes: 1 (use --verbose for breakdown)
success createPages - 0.001s
success Checking for changed pages - 0.000s
success createPagesStatefully - 0.073s
success update schema - 0.023s
success write out redirect data - 0.001s
success Build manifest and related icons - 0.001s
success onPostBootstrap - 0.003s
info bootstrap finished - 3.272s
success onPreExtractQueries - 0.000s
success extract queries from components - 0.075s
success write out requires - 0.005s
success run page queries - 0.021s - 2/2 96.47/s
warning ESLintError:
/Volumes/Work files/dev/github/basukala.me/src/pages/index.js
20:85 warning Using target="_blank" without rel="noreferrer" is a security risk: see https://html.spec.whatwg.org/multipage/links.html#link-type-noopener react/jsx-no-target-blank
20:156 warning Using target="_blank" without rel="noreferrer" is a security risk: see https://html.spec.whatwg.org/multipage/links.html#link-type-noopener react/jsx-no-target-blank
✖ 2 problems (0 errors, 2 warnings)
error Generating development JavaScript bundle failed
Missing binding /Volumes/Work files/dev/github/basukala.me/node_modules/node-sass/vendor/darwin-x64-67/binding.node
Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 11.x
Found bindings for the following environments:
- OS X 64-bit with Node.js 10.x
This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to download the binding for your current environment.
failed Building development bundle - 3.733s
I needed to rebuild node-sass though( npm rebuild node-sass
). I did that and it worked. The app ran at port 8000. I gradually switched to node version 12, 13, and, 14. Each of them complained about node-sass binary not found. Each time I installed them and it worked afterwards. I finally switched to node version 15. And the error your reported, that i faced blindly appeared again. I checked nodejs website and found it was the latest version and not LTS. It contained the breaking change that do not support node sass. Please make sure you're using LTS version for stability. I'm glad if it help you( @SeifESlimene)
When i did
npm install
command in terminal