vendredi 4 juillet 2014

Error when running grunt serve


Vote count:

0




I'm running into error when trying to run the grunt serve locally. I have been following the step guide on how to build a todo-app with Yeoman. Everything went fine until step 5 when it was time to run $ grunt serve. http://ift.tt/1mjWg8G


I getting this error message:



>> Local Npm module "grunt-contrib-connect" not found. Is it installed?
>> Local Npm module "grunt-contrib-htmlmin" not found. Is it installed?
>> Local Npm module "grunt-contrib-imagemin" not found. Is it installed?
>> Local Npm module "grunt-contrib-uglify" not found. Is it installed?
>> Local Npm module "grunt-contrib-watch" not found. Is it installed?
>> Local Npm module "grunt-google-cdn" not found. Is it installed?
>> Local Npm module "grunt-newer" not found. Is it installed?
>> Local Npm module "grunt-ngmin" not found. Is it installed?
>> Local Npm module "grunt-svgmin" not found. Is it installed?

Running "server" task
>> The `server` task has been deprecated. Use `grunt serve` to start a server.

Running "serve:undefined" (serve) task
Warning: Task "connect:livereload" not found. Use --force to continue.

Aborted due to warnings.

Execution Time (2014-07-04 12:13:08 UTC)
loading tasks 4ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 50%
server 1ms ▇▇▇▇▇▇ 13%
serve:undefined 2ms ▇▇▇▇▇▇▇▇▇▇▇▇ 25%
Total 8ms


When I looked at my folders I was missing the folder bower_components. I manually installed it with the Terminal.


my package.json file contains:



"devDependencies": {
"grunt": "^0.4.5",
"grunt-autoprefixer": "^0.7.3",
"grunt-concurrent": "^0.5.0",
"grunt-contrib-clean": "^0.5.0",
"grunt-contrib-concat": "^0.4.0",
"grunt-contrib-connect": "^0.7.1",
"grunt-contrib-copy": "^0.5.0",
"grunt-contrib-cssmin": "^0.9.0",
"grunt-contrib-htmlmin": "^0.3.0",
"grunt-contrib-imagemin": "^0.7.0",
"grunt-contrib-jshint": "^0.10.0",
"grunt-contrib-uglify": "^0.4.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-filerev": "^0.2.1",
"grunt-google-cdn": "^0.4.0",
"grunt-newer": "^0.7.0",
"grunt-ngmin": "^0.0.3",
"grunt-svgmin": "^0.4.0",
"grunt-usemin": "^2.1.1",
"grunt-wiredep": "^1.7.0",
"jshint-stylish": "^0.2.0",
"load-grunt-tasks": "^0.4.0",
"time-grunt": "^0.3.1"
},


package.json and Gruntfile.js is in the same folder.


My folder node_modules doesn't contain the folders:



  • grunt-contrib-connect

  • grunt-contrib-htmlmin

  • grunt-contrib-imagemin

  • grunt-contrib-uglify

  • grunt-contrib-watch

  • grunt-google-cdn

  • grunt-newer

  • grunt-ngmin

  • grunt-svgmin


Is that the problem?


I have checked the versions of Bower (1.3.6), Git (1.8.5.2 (Apple Git-48)), Grunt (grunt-cli v0.1.13, grunt v0.4.5), Node (v0.10.29). All of them are installed.


I have been trying to run npm install. But then I get a new error:



npm WARN package.json mytodo@0.0.0 No description
npm WARN package.json mytodo@0.0.0 No repository field.
npm WARN package.json mytodo@0.0.0 No README data
npm ERR! Error: EACCES, mkdir '/Users/mattiashaal/.npm/async/0.7.0'
npm ERR! { [Error: EACCES, mkdir '/Users/mattiashaal/.npm/async/0.7.0']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/Users/mattiashaal/.npm/async/0.7.0',
npm ERR! parent: 'grunt-contrib-imagemin' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/mattiashaal/mytodo
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.5.0-alpha-1
npm ERR! path /Users/mattiashaal/.npm/async/0.7.0
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/Users/mattiashaal/.npm/async/0.7.0'
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/Users/mattiashaal/mytodo/node_modules/grunt-contrib-connect/node_modules/async'
npm ERR! error rolling back grunt-contrib-connect@0.7.1 { [Error: ENOTEMPTY, rmdir '/Users/mattiashaal/mytodo/node_modules/grunt-contrib-connect/node_modules/async']
npm ERR! error rolling back errno: 53,
npm ERR! error rolling back code: 'ENOTEMPTY',
npm ERR! error rolling back path: '/Users/mattiashaal/mytodo/node_modules/grunt-contrib-connect/node_modules/async' }
npm ERR! Error: ENOENT, lstat '/Users/mattiashaal/mytodo/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/compress.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://ift.tt/1haKPNr;

npm ERR! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/mattiashaal/mytodo
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.5.0-alpha-1
npm ERR! path /Users/mattiashaal/mytodo/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/compress.js
npm ERR! fstream_path /Users/mattiashaal/mytodo/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/compress.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (evalmachine.<anonymous>:107:15)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/mattiashaal/mytodo/npm-debug.log
npm ERR! not ok code 0


I have tried to google for a solution to my problem without success. I'm newbie to the terminal, Yeoman, Bower and Grunt stuff.


Is there anybody know what to do?



asked 34 secs ago






Aucun commentaire:

Enregistrer un commentaire