2016-08-25 53 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 ... 我希望這個幫助。