因 core-js 安装后脚本错误而失败
Failed at the core-js postinstall script error
当我尝试在现有 Angular project
中安装节点模块时遇到以下错误。我正在尝试在 windows 机器(Win32 X64)中安装节点模块。
> core-js@2.6.12 postinstall node_modules\babel-runtime\node_modules\core-js
> node -e "try{require('-/postinstall')}catch(e){}"
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\ng-cli-pug-loader\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted ("os":"darwin","arch":"any") (current: {"as":"vin3
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\@angular\compiler-cli\node_modules\fsevents): arch":"x64"})
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted ("os": "darwin","arch":"any") (current: {"as":"u ","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted ("os": "darwin","arch":"any") (current: {"as":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn bash
npm ERR! file bash
npm ERR! path bash
npm ERR! errno -4058
npm ERR! core-js@3.6.4 postinstall: "node -e "try(require('./postinstall')}catch(e){}"
npm ERR! spawn bash 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\test\AppData\Roaming\npm-cache\_logs21-06-23T16_43_06_961Z-debug.log
以下是我系统安装的版本
AngularCli : 8.3.29
Node : 14.17.1
NPM: 8.2.12
我尝试删除节点模块文件夹和 运行 npm cache clean --force
并重新安装节点模块,还尝试卸载 nodejs 并删除 npm-cache 文件夹并重新安装。
我仍然面临同样的问题。任何帮助将不胜感激。
此错误意味着安装后脚本 fork
-和-exec
'ing bash
,Windows 上不存在。您需要从 MINGW64 (Git Bash) 等 Bash 模拟器 运行。
当我尝试在现有 Angular project
中安装节点模块时遇到以下错误。我正在尝试在 windows 机器(Win32 X64)中安装节点模块。
> core-js@2.6.12 postinstall node_modules\babel-runtime\node_modules\core-js
> node -e "try{require('-/postinstall')}catch(e){}"
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\ng-cli-pug-loader\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted ("os":"darwin","arch":"any") (current: {"as":"vin3
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\@angular\compiler-cli\node_modules\fsevents): arch":"x64"})
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted ("os": "darwin","arch":"any") (current: {"as":"u ","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted ("os": "darwin","arch":"any") (current: {"as":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn bash
npm ERR! file bash
npm ERR! path bash
npm ERR! errno -4058
npm ERR! core-js@3.6.4 postinstall: "node -e "try(require('./postinstall')}catch(e){}"
npm ERR! spawn bash 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\test\AppData\Roaming\npm-cache\_logs21-06-23T16_43_06_961Z-debug.log
以下是我系统安装的版本
AngularCli : 8.3.29
Node : 14.17.1
NPM: 8.2.12
我尝试删除节点模块文件夹和 运行 npm cache clean --force
并重新安装节点模块,还尝试卸载 nodejs 并删除 npm-cache 文件夹并重新安装。
我仍然面临同样的问题。任何帮助将不胜感激。
此错误意味着安装后脚本 fork
-和-exec
'ing bash
,Windows 上不存在。您需要从 MINGW64 (Git Bash) 等 Bash 模拟器 运行。