簡體   English   中英

錯誤npm並發安裝lite-server typescript

[英]Error npm install concurrently lite-server typescript

我正試圖在angular的快速啟動時修復npm啟動問題,所以我嘗試安裝這些依賴項。 不幸的是我遇到這些錯誤消息:

$ 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

我不知道這意味着什么,因為我只是一個初學者。

您必須重新安裝node.js包node.js

它解決了我的問題

有幾種方法可以解決這個問題。 它與權限有關。 下面列出了兩種解決方案的摘要:

解決方案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添加到〜/ .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了解更多詳情

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM