Upon yarn build
my projects fails to build. I've tried recommended options, but nothing works and error returns every-time. The project works upon using yarn start
, just the build
doesn't work
[ERROR] Unable to build website for locale en.
[ERROR] Error:
Something went wrong installing the "sharp" module
Cannot find module '../build/Release/sharp-darwin-x64.node'
Require stack:
- /Users/.../node_modules/sharp/lib/sharp.js
- /Users/.../node_modules/sharp/lib/constructor.js
- /Users/.../node_modules/sharp/lib/index.js
- /Users/.../node_modules/@docusaurus/responsive-loader/lib/adapters/sharp.js
- /Users/..../node_modules/@docusaurus/responsive-loader/sharp.js
- /Users/.../node_modules/@docusaurus/plugin-ideal-image/lib/index.js
- /Users/.../node_modules/@docusaurus/core/lib/server/plugins/init.js
- /Users/.../node_modules/@docusaurus/core/lib/server/plugins/index.js
- /Users/.../node_modules/@docusaurus/core/lib/server/index.js
- /Users/.../node_modules/@docusaurus/core/lib/commands/build.js
- /Users/.../node_modules/@docusaurus/core/lib/index.js
- /Users/.../node_modules/@docusaurus/core/bin/docusaurus.js
Possible solutions:
- Install with the --verbose flag and look for errors: "npm install --ignore-scripts=false --verbose sharp"
- Install for the current runtime: "npm install --platform=darwin --arch=x64 sharp"
- Consult the installation documentation: https://sharp.pixelplumbing.com/install
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:93:18)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:93:18)
at Module._compile (internal/modules/cjs/loader.js:1085:14)