在核心失败-js安装后脚本错误 [英] Failed at the core-js postinstall script error

查看:12
本文介绍了在核心失败-js安装后脚本错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

       > core-js@2.6.12 postinstall node_modulesabel-runtime
ode_modulescore-js 
       > node -e "try{require('-/postinstall')}catch(e){}"

      npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules
g-cli-pug-loader
ode_modulesfsevents):
      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@angularcompiler-cli
ode_modulesfsevents): 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_modulesfsevents): 
      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	estAppDataRoaming
pm-cache\_logs2021-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文件夹并重新安装。

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

推荐答案

此错误意味着安装后脚本是forkexecingbash,这在Windows上不存在。您需要从像MINGW64(Git Bash)这样的Bash模拟器运行此脚本。

这篇关于在核心失败-js安装后脚本错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆