Grunt构建失败

时间:2016-09-05 07:57:56

标签: angularjs amazon-web-services gruntjs

我正在尝试构建我的angularjs项目,但我一直收到此错误。我已经搜索了一个解决方案,但找不到一个。我该如何解决这个错误?

感谢。

错误消息

"/usr/local/bin/grunt" "clean"
>> Local Npm module "grunt-aws" not found. Is it installed?
>> Local Npm module "grunt-contrib-connect" not found. Is it installed?
Loading "Gruntfile.js" tasks...ERROR
>> Error: Unable to read ".aws.json" file (Error code: ENOENT).
>> No "clean" targets found.
Warning: Task "clean" failed. Use --force to continue.

Aborted due to warnings.
Done.

1 个答案:

答案 0 :(得分:0)

我认为您需要在AWS上启动脚本之前安装缺少的依赖项。

尝试在package.json中添加以下内容:

"scripts": { "postinstall": "npm install" }

或者只需在启动应用之前运行npm install grunt-aws grunt-contrib-connect ...