gpt4 book ai didi

node.js - npm 打包器安装错误

转载 作者:搜寻专家 更新时间:2023-10-31 23:28:41 25 4
gpt4 key购买 nike

我运行了命令-

sudo curl http://npmjs.org/install.sh |嘘

但是我收到了这个错误。谁能帮忙?

Password:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
101 7881 101 7881 0 0 5165 0 0:00:01 0:00:01 --:--:-- 7696
tar=/usr/bin/tar
version:
bsdtar 2.6.2 - libarchive 2.6.2
install npm@1.0
fetching: http://registry.npmjs.org/npm/-/npm-1.0.106.tgz
0.5.11-pre
1.0.106
cleanup prefix=/usr/local
All clean!
npm ERR! Could not create /usr/local/lib/node_modules/___npm.npm
npm ERR! error installing npm@1.0.106 Error: EACCESS, Permission denied '/usr/local/lib/node_modules'
npm ERR! Error: EACCESS, Permission denied '/usr/local/lib/node_modules'
npm ERR! Report this *entire* log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>
npm ERR!
npm ERR! System Darwin 10.8.0
npm ERR! command "/usr/local/bin/node" "/private/var/folders/a4/a4oBVIXZEDS3kWEMo4Gh8U+++TI/-Tmp-/npm.4405/package/cli.js" "install" "-gf"
npm ERR! cwd /private/var/folders/a4/a4oBVIXZEDS3kWEMo4Gh8U+++TI/-Tmp-/npm.4405/package
npm ERR! node -v v0.5.11-pre
npm ERR! npm -v 1.0.106
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCESS
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /private/var/folders/a4/a4oBVIXZEDS3kWEMo4Gh8U+++TI/-Tmp-/npm.4405/package/npm-debug.log
npm not ok
It failed

最佳答案

他们建议不要在此站点上使用 Sudo:http://howtonode.org/introduction-to-npm , 而改为使用:

sudo chown -R $USER /usr/local

其次是:

curl http://npmjs.org/install.sh | sh

关于node.js - npm 打包器安装错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8931484/

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