gpt4 book ai didi

node.js - 我想通过 npm 安装一些东西,但它说 'error' 和 'checkPermissions Missing'

转载 作者:太空宇宙 更新时间:2023-11-04 00:04:43 24 4
gpt4 key购买 nike

这是我的第一篇文章,所以我不确定回答我正在做的事情是否正确..哈哈

Jongryului-MacBook-Pro:~ jongryulpark$ npm install uglify-js -g
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! { Error: EACCES: permission denied, access '/usr/local/lib/node_modules'

作为标题,我不知道为什么会出错..

npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jongryulpark/.npm/_logs/2018-10-18T01_28_56_508Z-debug.log
Jongryului-MacBook-Pro:~ jongryulpark$

为了解决这个问题,我用谷歌搜索,并听说了 nvm..但这也不起作用

最佳答案

尝试使用 sudo 运行该命令。

sudo npm install

关于node.js - 我想通过 npm 安装一些东西,但它说 'error' 和 'checkPermissions Missing',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52866061/

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