这是日志:
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.
答案 0 :(得分:0)
我重新安装后出现此错误,此步骤对我有用:
用以前的版本替换新版本的node_modules文件夹(我保存了备份...)
运行npm start
将以前版本的node_modules文件夹替换为新版本。
之后,npm开始完美地使用新版本。 这似乎是npm的bug ... 我希望这有帮助。