2017-09-23 55 views
0

我試圖在生產配置文件中運行我的應用程序,我使用jijster生成器的春季啓動應用程序和角度。該應用程序只運行頁腳和背景,但其餘的應用程序不行,錯誤生產配置文件Jhipster發生器錯誤

Uncaught Error: [$injector:modulerr] Failed to instantiate module myAppdue to: 
    Error: [$injector:nomod] Module 'myApp' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument. 
    http://errors.angularjs.org/1.5.8/$injector/nomod?p0=myApp 
     at http://localhost:8080/app/vendor-7004bf12ca.js:8:17716 
     at http://localhost:8080/app/vendor-7004bf12ca.js:8:27870 
     at n (http://localhost:8080/app/vendor-7004bf12ca.js:8:27343) 
     at http://localhost:8080/app/vendor-7004bf12ca.js:8:27655 
     at http://localhost:8080/app/vendor-7004bf12ca.js:9:4997 
     at r (http://localhost:8080/app/vendor-7004bf12ca.js:8:18164) 
     at f (http://localhost:8080/app/vendor-7004bf12ca.js:9:4845) 
     at rt (http://localhost:8080/app/vendor-7004bf12ca.js:9:6774) 
     at a (http://localhost:8080/app/vendor-7004bf12ca.js:8:25413) 
     at ie (http://localhost:8080/app/vendor-7004bf12ca.js:8:25723) 
    http://errors.angularjs.org/1.5.8/$injector/modulerr?p0=myApp&p1=Error%3A%20%5B%24injector%3Anomod%5D%20Module%20'myApp'%20is%20not%20available!%20You%20either%20misspelled%20the%20module%20name%20or%20forgot%20to%20load%20it.%20If%20registering%20a%20module%20ensure%20that%20you%20specify%20the%20dependencies%20as%20the%20second%20argument.%0Ahttp%3A%2F%2Ferrors.angularjs.org%2F1.5.8%2F%24injector%2Fnomod%3Fp0%3DdigitalBlogApp%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A8080%2Fapp%2Fvendor-7004bf12ca.js%3A8%3A17716%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A8080%2Fapp%2Fvendor-7004bf12ca.js%3A8%3A27870%0A%20%20%20%20at%20n%20(http%3A%2F%2Flocalhost%3A8080%2Fapp%2Fvendor-7004bf12ca.js%3A8%3A27343)%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A8080%2Fapp%2Fvendor-7004bf12ca.js%3A8%3A27655%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A8080%2Fapp%2Fvendor-7004bf12ca.js%3A9%3A4997%0A%20%20%20%20at%20r%20(http%3A%2F%2Flocalhost%3A8080%2Fapp%2Fvendor-7004bf12ca.js%3A8%3A18164)%0A%20%20%20%20at%20f%20(http%3A%2F%2Flocalhost%3A8080%2Fapp%2Fvendor-7004bf12ca.js%3A9%3A4845)%0A%20%20%20%20at%20rt%20(http%3A%2F%2Flocalhost%3A8080%2Fapp%2Fvendor-7004bf12ca.js%3A9%3A6774)%0A%20%20%20%20at%20a%20(http%3A%2F%2Flocalhost%3A8080%2Fapp%2Fvendor-7004bf12ca.js%3A8%3A25413)%0A%20%20%20%20at%20ie%20(http%3A%2F%2Flocalhost%3A8080%2Fapp%2Fvendor-7004bf12ca.js%3A8%3A25723) 
     at http://localhost:8080/app/vendor-7004bf12ca.js:8:17716 
     at http://localhost:8080/app/vendor-7004bf12ca.js:8:27870 
     at n (http://localhost:8080/app/vendor-7004bf12ca.js:8:27343) 
     at http://localhost:8080/app/vendor-7004bf12ca.js:8:27655 
     at http://localhost:8080/app/vendor-7004bf12ca.js:9:4997 
     at r (http://localhost:8080/app/vendor-7004bf12ca.js:8:18164) 
     at f (http://localhost:8080/app/vendor-7004bf12ca.js:9:4845) 
     at rt (http://localhost:8080/app/vendor-7004bf12ca.js:9:6774) 
     at a (http://localhost:8080/app/vendor-7004bf12ca.js:8:25413) 
     at ie (http://localhost:8080/app/vendor-7004bf12ca.js:8:25723) 
    http://errors.angularjs.org/1.5.8/$injector/modulerr?p0=myApp&p1=Error%3A%20%5B%24injector%3Anomod%5D%20Module%20'myApp'%20is%20not%20available!%20You%20either%20misspelled%20the%20module%20name%20or%20forgot%20to%20load%20it.%20If%20registering%20a%20module%20ensure%20that%20you%20specify%20the%20dependencies%20as%20the%20second%20argument.%0Ahttp%3A%2F%2Ferrors.angularjs.org%2F1.5.8%2F%24injector%2Fnomod%3Fp0%3DdigitalBlogApp%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A8080%2Fapp%2Fvendor-7004bf12ca.js%3A8%3A17716%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A8080%2Fapp%2Fvendor-7004bf12ca.js%3A8%3A27870%0A%20%20%20%20at%20n%20(http%3A%2F%2Flocalhost%3A8080%2Fapp%2Fvendor-7004bf12ca.js%3A8%3A27343)%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A8080%2Fapp%2Fvendor-7004bf12ca.js%3A8%3A27655%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A8080%2Fapp%2Fvendor-7004bf12ca.js%3A9%3A4997%0A%20%20%20%20at%20r%20(http%3A%2F%2Flocalhost%3A8080%2Fapp%2Fvendor-7004bf12ca.js%3A8%3A18164)%0A%20%20%20%20at%20f%20(http%3A%2F%2Flocalhost%3A8080%2Fapp%2Fvendor-7004bf12ca.js%3A9%3A4845)%0A%20%20%20%20at%20rt%20(http%3A%2F%2Flocalhost%3A8080%2Fapp%2Fvendor-7004bf12ca.js%3A9%3A6774)%0A%20%20%20%20at%20a%20(http%3A%2F%2Flocalhost%3A8080%2Fapp%2Fvendor-7004bf12ca.js%3A8%3A25413)%0A%20%20%20%20at%20ie%20(http%3A%2F%2Flocalhost%3A8080%2Fapp%2Fvendor-7004bf12ca.js%3A8%3A25723) 
     at http://localhost:8080/app/vendor-7004bf12ca.js:8:17716 
     at http://localhost:8080/app/vendor-7004bf12ca.js:9:5273 
     at r (http://localhost:8080/app/vendor-7004bf12ca.js:8:18164) 
     at f (http://localhost:8080/app/vendor-7004bf12ca.js:9:4845) 
     at rt (http://localhost:8080/app/vendor-7004bf12ca.js:9:6774) 
     at a (http://localhost:8080/app/vendor-7004bf12ca.js:8:25413) 
     at ie (http://localhost:8080/app/vendor-7004bf12ca.js:8:25723) 
     at re (http://localhost:8080/app/vendor-7004bf12ca.js:8:24962) 
     at HTMLDocument.<anonymous> (http://localhost:8080/app/vendor-7004bf12ca.js:13:25627) 
     at p (http://localhost:8080/app/vendor-7004bf12ca.js:2:8692) 

它可能是什麼?

+0

請告訴我你的節點版本 –

+0

你使用java -jar在本地運行prod構建的war嗎? –

回答

1

這可能是由於你在index.html中改變了一些東西,因爲JHipster在爲生產構建時使用gulp注入腳本和css。將您當前的版本與您在項目生成時在git中存檔的版本進行比較。

+0

正確的答案,但現在我有其他問題,一些javascript文件自定義,我下載並添加到項目中,這些文件沒有正確注入到供應商,任何想法?控制檯給了我相同的錯誤控制檯,但現在我知道什麼模塊失敗,但我不知道如何解決這個問題 –

+0

如果我的回答是正確的,請考慮接受它。我已經在stackoverflow上回答了這個問題,問題在於你的依賴項的bower.json文件沒有正確聲明主屬性。您必須在項目bower.json中使用覆蓋屬性。 –