2016-08-25 82 views
1

这时候的错误是日志:角2:试图NPM启动

node_modules/@angular/router/src/config.d.ts(255,17): error TS1110: Type expected. 
node_modules/@angular/router/src/config.d.ts(256,15): error TS1109: Expression expected. 
node_modules/@angular/router/src/config.d.ts(257,16): error TS1109: Expression expected. 
node_modules/@angular/router/src/config.d.ts(258,12): error TS1109: Expression expected. 
node_modules/@angular/router/src/config.d.ts(259,17): error TS1109: Expression expected. 
node_modules/@angular/router/src/config.d.ts(260,19): error TS1109: Expression expected. 
node_modules/@angular/router/src/config.d.ts(261,10): error TS1109: Expression expected. 
node_modules/@angular/router/src/config.d.ts(262,13): error TS1109: Expression expected. 
node_modules/@angular/router/src/config.d.ts(263,14): error TS1109: Expression expected. 
node_modules/@angular/router/src/config.d.ts(264,1): error TS1128: Declaration or statement expected. 
+1

嗨。你应该编辑你的问题并添加产生这些错误的相关代码。如果我们不知道你现在拥有什么,我们无法帮助你。 – Andrej

+0

代码格式化,标题拼写错误修复。请添加您的代码和错误的完整痕迹。只有这个日志,我们无法帮助你。 – Apostolos

+0

由于它来自角度来源,我猜这是一个包配置问题或类似的东西。 –

回答

0

我后出现此错误重新安装,此步骤可帮助对我来说:

  1. 更换的新版本node_modules文件夹与以前的版本(我保存的备份...)

  2. 运行NPM启动

  3. 将先前版本的node_modules文件夹替换为新版本。

之后,npm开始与新版本完美的工作。 这似乎是错误的NPM ... 我希望这个帮助。