角度安装失败,出现以下错误,并且未安装角度。
D:\ software \ node-v8.11.2-win-x64> npm install -g @ angular / cli D:\ software \ node-v8.11.2-win-x64 \ ng-> D:\ eclipse \ software \ node-v8.11.2-win-x64 \ node_modules @ angular \ cli \ bin \ ng
@ angular / cli @ 6.0.8安装后 D:\ eclipse \ software \ node-v8.11.2-win-x64 \ node_modules @ angular \ cli节点 ./bin/ng-update-message.js
'node'不被识别为内部或外部命令,可操作 程序或批处理文件。 npm警告可选的跳过选择性依赖: fsevents@1.2.4(node_modules @ angular \ cli \ node_modules \ fsevents):npm 警告提示不跳过依赖:不支持的平台 fsevents@1.2.4:通缉{“ os”:“ darwin”,“ arch”:“ any”}(当前: {“ os”:“ win32”,“ arch”:“ x64”})
npm错误!代码ELIFECYCLE npm ERR! errno 1 npm错误! @ angular / cli @ 6.0.8 后安装:节点./bin/ng-update-message.js npm错误!退出状态1 npm ERR! npm ERR! @ angular / cli @ 6.0.8安装后脚本失败。 npm ERR! npm可能不是问题。有可能 上面的其他日志输出。
npm错误!可以在以下位置找到该运行的完整日志:npm ERR! C:\ Users \ N96304.LAUNCHER \ AppData \ Roaming \ npm-cache_logs \ 2018-06-19T08_39_53_490Z-debug.lo
日志错误:
8474 info lifecycle @angular/cli@6.0.8~postinstall: @angular/cli@6.0.8
8475 verbose lifecycle @angular/cli@6.0.8~postinstall: unsafe-perm in lifecycle true
8476 verbose lifecycle @angular/cli@6.0.8~postinstall: PATH: D:software\node-v8.11.2-win-x64\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:software\node-v8.11.2-win-x64\node_modules\@angular\cli\node_modules\.bin;D:software\node-v8.11.2-win-x64\node_modules\.bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft Application Virtualization Client;C:\Program Files (x86)\EHLLAPI\;C:\Program Files (x86)\PortalClient\;C:\Program Files (x86)\Citrix\ICAService;C:\Program Files (x86)\Citrix\System32;C:\Program Files (x86)\InstallShield\AdminStudio\6.0\ConflictSolver;C:\Program Files (x86)\Common Files\Citrix\system32;C:\Program Files\Citrix\System32\;C:\Program Files\Citrix\ICAService\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\instantclient_12_2;C:\Program Files\instantclient_12_2;D:software\New folder\Fiddler;D:software\Fiddler
8477 verbose lifecycle @angular/cli@6.0.8~postinstall: CWD: D:software\node-v8.11.2-win-x64\node_modules\@angular\cli
8478 silly lifecycle @angular/cli@6.0.8~postinstall: Args: [ '/d /s /c', 'node ./bin/ng-update-message.js' ]
8479 silly lifecycle @angular/cli@6.0.8~postinstall: Returned: code: 1 signal: null
8480 info lifecycle @angular/cli@6.0.8~postinstall: Failed to exec postinstall script
8481 verbose unlock done using C:\Users\N96304.LAUNCHER\AppData\Roaming\npm-cache\_locks\staging-acb702ed8f4300ec.lock for D:software\node-v8.11.2-win-x64\node_modules\.staging
8482 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\@angular\cli\node_modules\fsevents):
8483 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
8484 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
8484 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
8484 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: win32
8484 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
8485 verbose stack Error: @angular/cli@6.0.8 postinstall: `node ./bin/ng-update-message.js`
8485 verbose stack Exit status 1
8485 verbose stack at EventEmitter.<anonymous> (D:software\node-v8.11.2-win-x64\node_modules\npm\node_modules\npm-lifecycle\index.js:285:16)
8485 verbose stack at emitTwo (events.js:126:13)
8485 verbose stack at EventEmitter.emit (events.js:214:7)
8485 verbose stack at ChildProcess.<anonymous> (D:software\node-v8.11.2-win-x64\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
8485 verbose stack at emitTwo (events.js:126:13)
8485 verbose stack at ChildProcess.emit (events.js:214:7)
8485 verbose stack at maybeClose (internal/child_process.js:925:16)
8485 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
8486 verbose pkgid @angular/cli@6.0.8
8487 verbose cwd D:software\node-v8.11.2-win-x64
8488 verbose Windows_NT 6.1.7601
8489 verbose argv "D:\\software\\node-v8.11.2-win-x64\\node.exe" "D:\\software\\node-v8.11.2-win-x64\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "@angular/cli"
8490 verbose node v8.11.2
8491 verbose npm v5.6.0
8492 error code ELIFECYCLE
8493 error errno 1
8494 error @angular/cli@6.0.8 postinstall: `node ./bin/ng-update-message.js`
8494 error Exit status 1
8495 error Failed at the @angular/cli@6.0.8 postinstall script.
8495 error This is probably not a problem with npm. There is likely additional logging output above.
8496 verbose exit [ 1, true ]
答案 0 :(得分:0)
请重新安装您的node.js并重试。确保环境变量PATH中包含Node.js。您也可以尝试重新安装Angular-CLI。
答案 1 :(得分:0)
只需在系统中添加节点变量:变量:node,路径:C:\ Program Files \ nodejs。
答案 2 :(得分:0)
CMD->以管理员身份运行-> C:\ Program Files \ nodejs> npm install -g @ angular / cli