无法启动节点项目

时间:2020-05-15 13:32:10

标签: node.js npm

D:\freelancing\FlowerAppProject\WEBAPP_10_5>npm install
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.

> node@11.15.0 preinstall D:\freelancing\FlowerAppProject\WEBAPP_10_5\node_modules\node
> node installArchSpecificPackage

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.2 (node_modules\chokidar\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 @angular-material-extensions/password-strength@4.1.2 requires a peer of @angular/animations@^8.2.14 but none is installed. You must install peer dependencies yourself.
npm WARN @angular-material-extensions/password-strength@4.1.2 requires a peer of @angular/cdk@^8.2.3 but none is installed. You must install peer dependencies yourself.
npm WARN @angular-material-extensions/password-strength@4.1.2 requires a peer of @angular/common@^8.2.14 but none is installed. You must install peer dependencies yourself.
npm WARN @angular-material-extensions/password-strength@4.1.2 requires a peer of @angular/core@^8.2.14 but none is installed. You must install peer dependencies yourself.
npm WARN @angular-material-extensions/password-strength@4.1.2 requires a peer of @angular/forms@^8.2.14 but none is installed. You must install peer dependencies yourself.
npm WARN @angular-material-extensions/password-strength@4.1.2 requires a peer of @angular/material@^8.2.3 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/compiler-cli@7.2.16 requires a peer of typescript@>=3.1.1 <3.3 but none is installed. You must install peer dependencies yourself.
npm WARN @ngtools/webpack@7.3.10 requires a peer of typescript@>=2.4.0 < 3.3 but none is installed. You must install peer dependencies yourself.
npm WARN @pscoped/ngx-pub-sub@3.0.0 requires a peer of @angular/common@^8.2.11 but none is installed. You must install peer dependencies yourself.
npm WARN @pscoped/ngx-pub-sub@3.0.0 requires a peer of @angular/core@^8.2.11 but none is installed. You must install peer dependencies yourself.
npm WARN angular-image-slider@0.0.9 requires a peer of @angular/animations@^8.2.13 but none is installed. You must install peer dependencies yourself.
npm WARN ng-image-slider@2.5.0 requires a peer of @angular/common@^8.2.2 but none is installed. You must install peer dependencies yourself.
npm WARN ng-image-slider@2.5.0 requires a peer of @angular/core@^8.2.2 but none is installed. You must install peer dependencies yourself.

npm ERR! file bash
npm ERR! path bash
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn bash
npm ERR! node@11.15.0 preinstall: `node installArchSpecificPackage`
npm ERR! spawn bash ENOENT
npm ERR!
npm ERR! Failed at the node@11.15.0 preinstall 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\hunter\AppData\Roaming\npm-cache\_logs\2020-05-15T13_23_06_391Z-debug.log

2 个答案:

答案 0 :(得分:0)

首先-您是否已运行npm install -g angular

如果是-

您是否尝试过手动安装缺少的依赖项?

npm WARN @angular-material-extensions/password-strength@4.1.2 requires a peer of @angular/animations@^8.2.14 but none is installed. You must install peer dependencies yourself.
npm WARN @angular-material-extensions/password-strength@4.1.2 requires a peer of @angular/cdk@^8.2.3 but none is installed. You must install peer dependencies yourself.
npm WARN @angular-material-extensions/password-strength@4.1.2 requires a peer of @angular/common@^8.2.14 but none is installed. You must install peer dependencies yourself.
npm WARN @angular-material-extensions/password-strength@4.1.2 requires a peer of @angular/core@^8.2.14 but none is installed. You must install peer dependencies yourself.
npm WARN @angular-material-extensions/password-strength@4.1.2 requires a peer of @angular/forms@^8.2.14 but none is installed. You must install peer dependencies yourself.
npm WARN @angular-material-extensions/password-strength@4.1.2 requires a peer of @angular/material@^8.2.3 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/compiler-cli@7.2.16 requires a peer of typescript@>=3.1.1 <3.3 but none is installed. You must install peer dependencies yourself.
npm WARN @ngtools/webpack@7.3.10 requires a peer of typescript@>=2.4.0 < 3.3 but none is installed. You must install peer dependencies yourself.
npm WARN @pscoped/ngx-pub-sub@3.0.0 requires a peer of @angular/common@^8.2.11 but none is installed. You must install peer dependencies yourself.
npm WARN @pscoped/ngx-pub-sub@3.0.0 requires a peer of @angular/core@^8.2.11 but none is installed. You must install peer dependencies yourself.
npm WARN angular-image-slider@0.0.9 requires a peer of @angular/animations@^8.2.13 but none is installed. You must install peer dependencies yourself.
npm WARN ng-image-slider@2.5.0 requires a peer of @angular/common@^8.2.2 but none is installed. You must install peer dependencies yourself.
npm WARN ng-image-slider@2.5.0 requires a peer of @angular/core@^8.2.2 but none is installed. You must install peer dependencies yourself.

package.json文件在理论上应该解决这一问题,但显然不是。

您应该向下移动列表,并手动npm install @angular/animations@^8.2.14等,直到所有条目都成功安装,然后重试。

由于某种原因,它不会自动获取依赖项-我假设您已经安装了angular或整个项目都来自您正在关注的某个教程?

答案 1 :(得分:0)

这些行意味着它尝试运行bash命令,但找不到它:

npm ERR! file bash
npm ERR! path bash
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn bash
npm ERR! node@11.15.0 preinstall: `node installArchSpecificPackage`
npm ERR! spawn bash ENOENT

我假设您是在不存在bash的Windows操作系统下运行它的(如果不是在WSL下运行它,例如 )。