首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在core-js postinstall脚本错误处失败

在core-js postinstall脚本错误处失败
EN

Stack Overflow用户
提问于 2021-06-24 02:57:25
回答 1查看 1.4K关注 0票数 1

当我尝试在现有的Angular project中安装节点模块时,我会遇到以下错误。我正在尝试在windows机器(Win32 X64)中安装节点模块。

代码语言:javascript
复制
       > 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\_logs\2021-06-23T16_43_06_961Z-debug.log

以下是安装在我的系统中的版本

代码语言:javascript
复制
  AngularCli : 8.3.29
  Node : 14.17.1
  NPM: 8.2.12

我已经尝试删除节点模块文件夹,运行npm cache clean --force并重新安装节点模块,也尝试卸载nodejs并删除npm-cache文件夹,然后重新安装。

我仍然面临着同样的问题。任何帮助都将不胜感激。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-07-01 01:06:29

这个错误意味着安装后脚本是fork-and-exec'ing bash,这在Windows上是不存在的。你需要从MINGW64 (Git Bash)之类的Bash模拟器运行它。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68105687

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档