我正在使用webapp生成器,我在默认构建上遇到错误。 我创建了一个新目录并运行
yo webapp
然后
grunt
最后
grunt server:dist
Chrome控制台出现以下错误:
Allo 'Allo! a53234b6.main.js:3
Running jQuery 1.10.2 a53234b6.main.js:3
Failed to load resource http://127.0.0.1:35729/livereload.js?snipver=1
Failed to load resource: the server responded with a status of 404 (Not Found) http://127.0.0.1:9000/modules/a53234b6.main.js
Uncaught Error: Script error for: a53234b6.main
http://requirejs.org/docs/errors.html#scripterror skitch.js:354
我使用了错误的命令吗?我需要更新node,npm,yeoman等吗?这是一个很棒的工具,但我可能需要切换回手动模式b / c我不能很好地解决它
答案 0 :(得分:0)
在package.json
的{{1}}下,添加以下内容:
devDependencies
然后:
"devDependencies": {
...
"grunt": "~0.4.2",
"grunt-contrib-copy": "~0.4.1",
"grunt-contrib-concat": "~0.3.0",
...
"grunt-contrib-watch": "~0.5.2",
...
"grunt-contrib-livereload": "0.1.2", // <- add this line