gpt4 book ai didi

node.js - 如何安装 numjs

转载 作者:行者123 更新时间:2023-12-04 09:45:53 24 4
gpt4 key购买 nike

我要npm install numjs但是在寻找解决方案 6 小时后,我遇到了同样的问题,在需要安装sharp的步骤中出现错误。

我试图卸载所有内容并重新安装,但它仍然不想这样做。我尝试了上千个我已经忘记的解决方案,但我没有成功。接下来我可以尝试什么?

控制台输出:

gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 
1
gyp ERR! stack at ChildProcess.onExit (C:\Users\Franck\AppData\Roaming\nvm\v12.17.0\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Franck\\AppData\\Roaming\\nvm\\v12.17.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Franck\Documents\CRMexperiment\node_modules\sharp
gyp ERR! node -v v12.17.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN crm@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\watchpack-chokidar2\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\webpack-dev-server\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sharp@0.20.8 install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sharp@0.20.8 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Franck\AppData\Roaming\npm-cache\_logs\2020-06-01T13_57_14_910Z-debug.log

日志文件中的错误:
1066 error errno 1
1067 error sharp@0.20.8 install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)`
1067 error Exit status 1
1068 error Failed at the sharp@0.20.8 install script.
1068 error This is probably not a problem with npm. There is likely additional logging output above.

最佳答案

您需要 to update sharp至少到 0.22.1为了让它工作。这已于 2020 年 4 月 30 日在 numjs 内部更新--请参阅此 commit但这不是 npm 中可用的版本(npm 仍然提供sharp 0.20.3,即 package.json 的 2018 年 6 月 13 日版本,因为 CI 因更新的sharp而失败。
由于它在主(主)分支中,您可以简单地从 github 中提取它,例如:

npm install https://github.com/nicolaspanel/numjs
yarn add https://github.com/nicolaspanel/numjs

关于node.js - 如何安装 numjs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62119181/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com