gpt4 book ai didi

linux - Ubuntu/安装 npm 模块时出现巨大错误

转载 作者:太空宇宙 更新时间:2023-11-04 05:09:39 25 4
gpt4 key购买 nike

节点:12.6.0,Npm:6.10.1,Ubuntu:19.04

我运行时遇到了这个巨大的错误 npm i <package-name>错误链接https://textsaver.flap.tv/lists/2s4g

当我包含 sudo sudo i <package-name> 时我收到这个错误

usama@usama:~/Learn/back-end/advance-nodejs/section two$ sudo npm i webworker-threads

> webworker-threads@0.7.17 install /home/usama/Learn/back-end/advance-nodejs/section two/node_modules/webworker-threads
> node-gyp rebuild

gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/usama/Learn/back-end/advance-nodejs/section two/node_modules/webworker-threads/build'
gyp ERR! System Linux 5.0.0-20-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/usama/Learn/back-end/advance-nodejs/section two/node_modules/webworker-threads
gyp ERR! node -v v12.6.0
gyp ERR! node-gyp -v v5.0.2
gyp ERR! not ok
npm WARN section-two@1.0.0 No description
npm WARN section-two@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! webworker-threads@0.7.17 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the webworker-threads@0.7.17 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! /home/usama/.npm/_logs/2019-07-13T15_25_15_922Z-debug.log
usama@usama:~/Learn/back-end/advance-nodejs/section two$

最佳答案

使用yarn而不是npm解决这个问题。

关于linux - Ubuntu/安装 npm 模块时出现巨大错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57020465/

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