I am running the project built with next.js but error occurs.
Error:
Something went wrong installing the "sharp" module
The specified procedure could not be found.
\\?\E:\Lohto_Creatureððð\portfolio\portfolio\node_modules\lqip-modern\node_modules\sharp\build\Release\sharp.node
- Remove the "node_modules/sharp" directory then run
"npm install --ignore-scripts=false --verbose sharp" and look for errors
- Consult the installation documentation at https://sharp.pixelplumbing.com/install
- Search for this error at https://github.com/lovell/sharp/issues
This error happened while generating the page. Any console logs will be displayed in the terminal window.
Call Stack
Object.<anonymous>
file:/E:/Lohto_Creature%F0%9F%98%80%F0%9F%98%80%F0%9F%98%81/portfolio/portfolio/node_modules/lqip-modern/node_modules/sharp/lib/constructor.js (32:9)
Module._compile
node:internal/modules/cjs/loader (1254:14)
Object.Module._extensions..js
node:internal/modules/cjs/loader (1308:10)
Module.load
node:internal/modules/cjs/loader (1117:32)
Function.Module._load
node:internal/modules/cjs/loader (958:12)
Module.require
node:internal/modules/cjs/loader (1141:19)
require
node:internal/modules/cjs/helpers (110:18)
Object.<anonymous>
file:/E:/Lohto_Creature%F0%9F%98%80%F0%9F%98%80%F0%9F%98%81/portfolio/portfolio/node_modules/lqip-modern/node_modules/sharp/lib/index.js (3:15)
Module._compile
node:internal/modules/cjs/loader (1254:14)
Object.Module._extensions..js
node:internal/modules/cjs/loader (1308:10)
could you give me a hand for this?
PS E:\Lohto_Creature\portfolio\portfolio> npm run dev
> [email protected] dev
> next dev
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
Warning: Contentlayer might not work as expected on Windows
Warning: Found 2 problems in 13 documents.
└── Couldn't determine the document type for 2 documents. (Skipping documents)
Please either define a filePathPattern for the given document type
definition or provide a valid value for the type field (i.e. the field "type" needs to be one of the following document type names: Project, BlogPost, Achievement).
• hashnode.json
• kprovider.json
Generated 11 documents in .contentlayer
event - compiled client and server successfully in 1342 ms (1073 modules)
wait - compiling / (client and server)...
event - compiled client and server successfully in 423 ms (1390 modules)wait - compiling /_error (client and server)...
event - compiled client and server successfully in 235 ms (1390 modules)warn - You have added a custom /_error page without a custom /404 page. This prevents the 404 page from being auto statically optimized.
See here for info: https://nextjs.org/docs/messages/custom-error-no-custom-404
error - Error:
Something went wrong installing the "sharp" module
The specified procedure could not be found.
\\?\E:\Lohto_Creatureððð\portfolio\portfolio\node_modules\lqip-
modern\node_modules\sharp\build\Release\sharp.node
- Remove the "node_modules/sharp" directory then run
"npm install --ignore-scripts=false --verbose sharp" and look for erro
This command worked for me.
You can refer to the following github discussion. https://github.com/lovell/sharp/issues/1627#issuecomment-477109851
Or you can edit in next.config.js as following: