npm start 不工作 npm(错误!在 apm@0.0.0 启动脚本失败.) [英] npm start is not working npm (ERR! Failed at the apm@0.0.0 start script.)

查看:116
本文介绍了npm start 不工作 npm(错误!在 apm@0.0.0 启动脚本失败.)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 link 中的示例来学习 angular.但是当我运行 npm start 时,它显示错误.我搜索了要求更新 npm 或 angular 版本的解决方案,但我已经在使用最新的,如下所示

I am using example in link to learn angular. but when I run npm start it shows error. I searched for solution it ask to update npm or angular version but I am already using latest as below

npm -v = 6.4.1

节点 -v = 10.9.0

角度 CLI = 6.1.5

我使用的是 Windows 7

I am using windows 7

 > apm@0.0.0 start F:\Angular\Angular-GettingStarted-master\APM-Start
 > ng serve -o

 npm ERR! file bash
 npm ERR! path bash
 npm ERR! code ELIFECYCLE
 npm ERR! errno ENOENT
 npm ERR! syscall spawn bash
 npm ERR! apm@0.0.0 start: `ng serve -o`
 npm ERR! spawn bash ENOENT
 npm ERR!
 npm ERR! Failed at the apm@0.0.0 start 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\AppData\Roaming\npm-cache\_logs\2018-09- 
 05T16_12_41_076Z-debug.log

推荐答案

您的节点版本似乎太高了.请将节点版本降级到 8.9.0.(确认您的 npm 版本也因节点而降级).

Your node version seems to be too higher. Please downgrade node version to 8.9.0. (Confirm that your npm version also gets downgraded based on node).

删除您的 node_modules 文件夹.

然后依次运行命令:

npm 缓存清理 --force

npm install

npm 重建 node-sass

然后尝试:ng serve

这篇关于npm start 不工作 npm(错误!在 apm@0.0.0 启动脚本失败.)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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