为了账号安全,请及时绑定邮箱和手机立即绑定

$npm start

如果输入$npm start就会出现:所在位置 行:1 字符: 6
+ $npm start
+      ~~~~~
表达式或语句中包含意外的标记“start”。
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken

如果输入npm start,就会出现

> angular2-demo@1.0.0 start C:\Users\B\Desktop\angular2-demo-master
> webpack-dev-server --inline --colors --progress --port 3000

'webpack-dev-server' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\B\\AppData\\Roaming\\npm\\nod
e_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v7.6.0
npm ERR! npm  v4.3.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! angular2-demo@1.0.0 start: `webpack-dev-server --inline --colors --progress --port 3
000`
npm ERR! Exit status 1

npm ERR! Failed at the angular2-demo@1.0.0 start script 'webpack-dev-server --inline --colors --progress --port 3000'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular2-demo package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     webpack-dev-server --inline --colors --progress --port 3000
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs angular2-demo
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls angular2-demo
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\B\AppData\Roaming\npm-cache\_logs\2017-03-13T06_36_58_626Z-debug.log


正在回答

2 回答

不是这个原因,我已经弄起来了,谢谢

0 回复 有任何疑惑可以回复我~
#1

WillpowerJ

请问下 这个错误怎么解决呀
2017-03-23 回复 有任何疑惑可以回复我~
#2

qq_快乐Kitty_0

请问这是什么原因造成的呢,我也遇到这个问题了
2017-05-24 回复 有任何疑惑可以回复我~

http://www.cnblogs.com/liangxiaojie/p/4595406.html

可能是缺少Python环境,安装一下,如果还出错,应该还要装VS

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
Angular2一小时快速入门
  • 参与学习       56850    人
  • 解答问题       79    个

Angular2一小时快速入门教程,帮助大家快速上手Angular2开发

进入课程
意见反馈 帮助中心 APP下载
官方微信