我在AWS上有一個Ubuntu實例,我使用僞造來設置服務器。 我已經安裝了包nodejs和npm。 爲了解決在Ubuntu上安裝全球包我按照本教程中提到的第二個解決方案的問題, https://docs.npmjs.com/getting-started/fixing-npm-permissions在Ubuntu服務器上從npm安裝@ angular/cli
現在,當我嘗試使用這個命令來安裝,
NPM安裝-g @angular/CLI
我碰到下面的錯誤,
[email protected]:~/frontend/current$ npm install -g @angular/cli
▐╢░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟ WARN引擎@ angular/cli @ 1.1.0:wanted:{「node」:「> = 6.9.0」,「npm」:「> = 3.0.0」}(current:{「node」:「4.2.6」,「npm」:「 3.5.2「}) loadDep:node-sass→heade▌███████████████████████░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░ loadDep:node-sass→resol████████████████████████░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░╟ loadDep:node-sass→mapTo▀█████████████████ ██████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟ loadDep:節點-sass→在████████████████████████之後░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░╟ loadDep:@ ngtools/json-sch████████████████ █████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟ loadDep :yargs→200▌██████████████████████████████████████████░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░ ░░░░░░░░░╟ /home/forge/.npm-global/bin/ng - > /home/forge/.npm-global/lib/node_modules/@angular/cli/bin/ng
[email protected]安裝/home/forge/.npm-global/lib/node_modules/@angular/cli/node_modules/node-sass 節點腳本/ install.js
SH :1:節點:未找到 npm WARN安裝:[email protected] [email protected]安裝:node scripts/install.js
npm WARN安裝:[email protected]產卵ENOENT /home/forge /。 npm-global/lib └─┬@a ngular/[email protected] └──未滿足可選依賴[email protected]^4.3.0
NPM WARN可選跳躍失敗可選依賴/ @角/ CLI/chokidar/fsevents: NPM WARN notsup不兼容您的操作系統或體系結構:[email protected]
清除所有相關的node_modules,cache,appdata,然後重新安裝nodejs。以「sudo」用戶身份登錄。使用命令'sudo npm install ...' – Aravind