2017-07-05 47 views
0

當我嘗試npm install一切似乎工作正常,但然後ng serve返回錯誤。我正在嘗試幾乎所有東西,但沒有任何效果。也許角度版本有問題?同一個項目正在另一臺計算機上工作。任何建議有什麼不對?從問題Angular 4 - webpack:無法編譯

ERROR in Error: Child compilation failed: 
    Entry module not found: Error: Can't resolve '/Users/myUser/Desktop/to/Project/frontend/src/index.html' in '/Users/myUser/Desk top/to/Project/frontend/node_modules/@angular/cli/models/webpack-configs': 
    Error: Can't resolve '/Users/myUser/Desktop/to/Project/frontend/src/index.html' in '/Users/myUser/Desktop/to/Project/frontend/node _modules/@angular/cli/models/webpack-configs' 

    - compiler.js:76 
    [frontend]/[html-webpack-plugin]/lib/compiler.js:76:16 

    - Compiler.js:291 Compiler.<anonymous> 
    [frontend]/[webpack]/lib/Compiler.js:291:10 

    - Compiler.js:494 
    [frontend]/[webpack]/lib/Compiler.js:494:13 

    - Tapable.js:138 next 
    [frontend]/[tapable]/lib/Tapable.js:138:11 

    - CachePlugin.js:62 Compiler.<anonymous> 
    [frontend]/[webpack]/lib/CachePlugin.js:62:5 

    - Tapable.js:142 Compiler.applyPluginsAsyncSeries 
    [frontend]/[tapable]/lib/Tapable.js:142:13 

    - Compiler.js:491 
    [frontend]/[webpack]/lib/Compiler.js:491:10 

    - Tapable.js:131 Compilation.applyPluginsAsyncSeries 
    [frontend]/[tapable]/lib/Tapable.js:131:46 

    - Compilation.js:645 self.applyPluginsAsync.err 
    [frontend]/[webpack]/lib/Compilation.js:645:19 

    - Tapable.js:131 Compilation.applyPluginsAsyncSeries 
    [frontend]/[tapable]/lib/Tapable.js:131:46 

    - Compilation.js:636 self.applyPluginsAsync.err 
    [frontend]/[webpack]/lib/Compilation.js:636:11 

    - Tapable.js:131 Compilation.applyPluginsAsyncSeries 
    [frontend]/[tapable]/lib/Tapable.js:131:46 

    - Compilation.js:631 self.applyPluginsAsync.err 
    [frontend]/[webpack]/lib/Compilation.js:631:10 

    - Tapable.js:131 Compilation.applyPluginsAsyncSeries 
    [frontend]/[tapable]/lib/Tapable.js:131:46 

    - Compilation.js:627 sealPart2 
    [frontend]/[webpack]/lib/Compilation.js:627:9 

    - Tapable.js:131 Compilation.applyPluginsAsyncSeries 
    [frontend]/[tapable]/lib/Tapable.js:131:46 


webpack: Failed to compile. 
+0

你是否也可以發佈你的ur文件結構? – Dhyey

+0

看起來您的項目根目錄中沒有「index.html」。 – Lansana

+0

是的,這是造成問題的原因。我在我的文件結構中添加了'index.html',一切正常。 – wahtdbogh

回答

0

感動的解決方案來回答:

SOLUTION:

我加index.html我的文件的結構和一切工作正常。