2016-08-02 73 views
0

我使用Yeoman作为项目启动器制作了AngularJS Web应用程序。Grunt Build创建破损的应用程序

启动以下命令:

grunt serve 

一切工作正常。

如果我尝试测试版DIST生产,使用以下命令:

grunt serve:dist 

我得到这样erorrs在浏览器控制台:

vendor.f13d432c.js:1 Uncaught Error: [$injector:modulerr] Failed to instantiate module myApp due to: 
Error: [$injector:modulerr] Failed to instantiate module uuid4 due to: 
Error: [$injector:nomod] Module 'uuid4' 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. 

有什么不对?

编辑

情况与此相同:

grunt build 

,然后在Web服务器部署dist文件夹

回答

0

您是否尝试过运行:

npm install 

显然, 'uuid4'不见了。这是一个npm包,所以你仍然需要包含这个,运行npm install。

+0

试图运行该命令,但没有任何改变。奇怪的是,没有缩小版本正确工作('grunt serve'),但dist版本不是('grunt serve:dist')。 – ronIDX