我正在尝试修复angular的快速启动上的npm start问题,所以我尝试安装这些依赖项。不幸的是,我遇到了这些错误消息:
$ sudo npm install -g concurrently lite-server typescript
npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "concurrently" "lite-server" "typescript"
npm ERR! node v6.6.0
npm ERR! npm v3.10.8
npm ERR! uid must be an unsigned int
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "concurrently" "lite-server" "typescript"
npm ERR! node v6.6.0
npm ERR! npm v3.10.8
[14 - 16 of this repeatedly appears]
npm ERR! uid must be an unsigned int
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /Users/username/npm-debug.log我不知道这意味着什么,因为我还只是个初学者。
发布于 2016-09-30 23:06:10
您必须重新安装node.js package node.js
它为我解决了这个问题
发布于 2016-10-02 06:29:57
有几种方法可以解决这个问题。它与权限有关。下面列出了这两种解决方案的摘要:
解决方案A:
(1)在/Users// as /Users//npm-global下创建npm-global目录
(2) npm config set prefix /Users//npm-global
(3)添加export PATH=/Users//npm-global/bin:$PATH to ~/.profile
(4)源~/.profile
(5)如果您不想执行第(3) & (4)步,请将导出注释添加到~/..bash_profile
或
解决方案B:
(1) sudo chown -R $USER /usr/local/
有关更多详细信息,请访问链接https://docs.npmjs.com/getting-started/fixing-npm-permissions
https://stackoverflow.com/questions/39607264
复制相似问题