简体   繁体   中英

Yeoman webapp errors on default build

I'm using the webapp generator and I'm getting errors on a default build. I create a new directory and run

yo webapp

Then

grunt

And finally

grunt server:dist

The Chrome console gives me the following errors:

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

Am I using the wrong commands? Do I need to update node, npm, yeoman, etc? This is an awesome tool, but I might need to switch back to manual mode b/c I can't troubleshoot it very well

In your package.json , under devDependencies , add the following:

  "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

Then:

$> npm install
$> bower install
$> grunt server

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM