node.js - Npm Install 不适用于我的其他项目
问题描述
Npm Install 不适用于我的其他项目
Windows 10,NPM - 6.14.4,Node-gyp - v7.1.0,Angular CLI:9.1.7,节点:12.17.0,操作系统:win32 x64
我正在尝试在我的 Windows 中运行 npm install 。
这是下面的错误
C:\Users\SSD\Desktop\PATH_TO_MY_PROJECT>npm i core-js@3.4.2
'CALL "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\\node_modules\npm\bin\npm-cli.js" prefix -g' is not recognized as an internal or external command,
operable program or batch file.
> core-js@3.6.4 postinstall C:\Users\SSD\Desktop\PATH_TO_MY_PROJECT\node_modules\@angular-devkit\build-angular\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"
npm WARN @ng-bootstrap/ng-bootstrap@7.0.0 requires a peer of @angular/common@^10.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ng-bootstrap/ng-bootstrap@7.0.0 requires a peer of @angular/core@^10.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ng-bootstrap/ng-bootstrap@7.0.0 requires a peer of @angular/forms@^10.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ng-bootstrap/ng-bootstrap@7.0.0 requires a peer of @angular/localize@^10.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ngtools/webpack@10.0.7 requires a peer of @angular/compiler-cli@>=10.0.0-next.0 < 11 but none is installed. You must install peer dependencies yourself.
npm WARN @ngtools/webpack@10.0.7 requires a peer of typescript@>=3.9 < 3.10 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\watchpack-chokidar2\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\webpack-dev-server\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn C:\Windows\system32\cmd.exe;C:\Program Files\Git\cmd\;C:\Users\SSD\AppData\Roaming\Python\Python38\Scripts;
npm ERR! file C:\Windows\system32\cmd.exe;C:\Program Files\Git\cmd\;C:\Users\SSD\AppData\Roaming\Python\Python38\Scripts;
npm ERR! path C:\Windows\system32\cmd.exe;C:\Program Files\Git\cmd\;C:\Users\SSD\AppData\Roaming\Python\Python38\Scripts;
npm ERR! errno ENOENT
npm ERR! core-js@3.6.4 postinstall: `node -e "try{require('./postinstall')}catch(e){}"`
npm ERR! spawn C:\Windows\system32\cmd.exe;C:\Program Files\Git\cmd\;C:\Users\SSD\AppData\Roaming\Python\Python38\Scripts; ENOENT
npm ERR!
npm ERR! Failed at the core-js@3.6.4 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\SSD\AppData\Roaming\npm-cache\_logs\2020-09-08T08_16_18_627Z-debug.log
这也是我的错误日志文件:
2167 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
2168 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
2168 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
2168 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: win32
2168 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
2169 verbose stack Error: core-js@3.6.4 postinstall: `node -e "try{require('./postinstall')}catch(e){}"`
2169 verbose stack spawn C:\Windows\system32\cmd.exe;C:\Program Files\Git\cmd\;C:\Users\SSD\AppData\Roaming\Python\Python38\Scripts; ENOENT
2169 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
2169 verbose stack at onErrorNT (internal/child_process.js:469:16)
2169 verbose stack at processTicksAndRejections (internal/process/task_queues.js:84:21)
2170 verbose pkgid core-js@3.6.4
2171 verbose cwd C:\Users\SSD\Desktop\PATH_TO_MY_PROJECT
2172 verbose Windows_NT 10.0.18362
2173 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--scripts-prepend-node-path=auto"
2174 verbose node v12.17.0
2175 verbose npm v6.14.4
2176 error code ELIFECYCLE
2177 error syscall spawn C:\Windows\system32\cmd.exe;C:\Program Files\Git\cmd\;C:\Users\SSD\AppData\Roaming\Python\Python38\Scripts;
2178 error file C:\Windows\system32\cmd.exe;C:\Program Files\Git\cmd\;C:\Users\SSD\AppData\Roaming\Python\Python38\Scripts;
2179 error path C:\Windows\system32\cmd.exe;C:\Program Files\Git\cmd\;C:\Users\SSD\AppData\Roaming\Python\Python38\Scripts;
2180 error errno ENOENT
2181 error core-js@3.6.4 postinstall: `node -e "try{require('./postinstall')}catch(e){}"`
2181 error spawn C:\Windows\system32\cmd.exe;C:\Program Files\Git\cmd\;C:\Users\SSD\AppData\Roaming\Python\Python38\Scripts; ENOENT
2182 error Failed at the core-js@3.6.4 postinstall script.
2182 error This is probably not a problem with npm. There is likely additional logging output above.
2183 verbose exit [ 1, true ]
任何人请帮忙。
解决方案
嗯,你能先试试 npm 安装 angular 然后再试一次吗?
推荐阅读
- c# - 从类内的方法中获取单个字符串值
- visual-studio-code - 有什么方法可以完全改变代码段在编辑器中的外观?
- python - 如何在 Ubuntu 10.04 上安装 python 包
- excel - sumifs 公式中的条件
- postgresql - 使用 PostgreSQL 优化尖峰去除
- python - 使用微软翻译服务将英文翻译成中文
- java - Eclipse java SE 8 - 缺少 javaSE 1.8 执行环境
- shell - Oozie Shell 操作输出数据超出其限制 [2048]
- javascript - mongo 和 node.js 中的点后的多个命令
- javascript - 全屏自定义视频播放器,但是当我展开全屏时,控件不会出现