我正在尝试在公司系统上使用Next.js,但每当我运行“npm run build”时,都会出现以下错误信息:“Error: Cannot find module 'sharp'
”
我尝试安装sharp,但是我收到了以下错误:
info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.10.5/libvips-8.10.5-win32-x64.tar.br
ERR! sharp getaddrinfo ENOTFOUND github.com
info sharp Attempting to build from source via node-gyp but this may fail due to the above error
info sharp Please see https://sharp.pixelplumbing.com/install for required dependencies
这可能是因为由于安全原因,我的系统终端阻止了github URL。有没有一种方法可以在不从github获取的情况下安装sharp? 我可以在浏览器中访问GitHub,所以如果可以从那里下载文件,然后某种方式进行安装,我可以这样做。
操作系统: Windows 10
sharp
依赖已在 v10.0.8 中被移除。现在运行良好。谢谢! - Abhijeet Singh