webcompat / webcompat.com

Source code for webcompat.com
https://webcompat.com
356 stars 188 forks source link

Grunt install fails with multiple errors. #253

Closed karlcow closed 9 years ago

karlcow commented 9 years ago

Context: In the process of installing for the first time to see if there are things missing in the instructions.

→ sudo npm install -g grunt-cli
Password:
/usr/local/bin/grunt -> /usr/local/lib/node_modules/grunt-cli/bin/grunt
grunt-cli@0.1.13 /usr/local/lib/node_modules/grunt-cli
├── resolve@0.3.1
├── nopt@1.0.10 (abbrev@1.0.5)
└── findup-sync@0.1.3 (lodash@2.4.1, glob@3.2.11)

(webcompatcom)11:13:39 ~/code/webcompat.com
→ npm install
npm WARN package.json webcompat@ No repository field.
npm ERR! Error: EACCES, mkdir '/Users/karl/.npm/glob/3.1.21'
npm ERR!  { [Error: EACCES, mkdir '/Users/karl/.npm/glob/3.1.21']
npm ERR!   errno: 3,
npm ERR!   code: 'EACCES',
npm ERR!   path: '/Users/karl/.npm/glob/3.1.21',
npm ERR!   parent: 'grunt' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Darwin 13.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/karl/code/webcompat.com
npm ERR! node -v v0.10.30
npm ERR! npm -v 1.4.21
npm ERR! path /Users/karl/.npm/glob/3.1.21
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/Users/karl/.npm/glob/3.1.21'
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/Users/karl/code/webcompat.com/node_modules/grunt-contrib-watch/node_modules/tiny-lr/node_modules/faye-websocket/lib/faye/websocket'
npm ERR! error rolling back  grunt-contrib-watch@0.5.3 { [Error: ENOTEMPTY, rmdir '/Users/karl/code/webcompat.com/node_modules/grunt-contrib-watch/node_modules/tiny-lr/node_modules/faye-websocket/lib/faye/websocket']
npm ERR! error rolling back   errno: 53,
npm ERR! error rolling back   code: 'ENOTEMPTY',
npm ERR! error rolling back   path: '/Users/karl/code/webcompat.com/node_modules/grunt-contrib-watch/node_modules/tiny-lr/node_modules/faye-websocket/lib/faye/websocket' }
npm ERR! Error: ENOENT, lstat '/Users/karl/code/webcompat.com/node_modules/grunt-contrib-watch/node_modules/tiny-lr/node_modules/qs/test/browser/expect.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://github.com/npm/npm/issues>

npm ERR! System Darwin 13.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/karl/code/webcompat.com
npm ERR! node -v v0.10.30
npm ERR! npm -v 1.4.21
npm ERR! path /Users/karl/code/webcompat.com/node_modules/grunt-contrib-watch/node_modules/tiny-lr/node_modules/qs/test/browser/expect.js
npm ERR! fstream_path /Users/karl/code/webcompat.com/node_modules/grunt-contrib-watch/node_modules/tiny-lr/node_modules/qs/test/browser/expect.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! Error: ENOENT, lstat '/Users/karl/code/webcompat.com/node_modules/grunt-contrib-watch/node_modules/tiny-lr/node_modules/faye-websocket/spec/faye/websocket/client_spec.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://github.com/npm/npm/issues>

npm ERR! System Darwin 13.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/karl/code/webcompat.com
npm ERR! node -v v0.10.30
npm ERR! npm -v 1.4.21
npm ERR! path /Users/karl/code/webcompat.com/node_modules/grunt-contrib-watch/node_modules/tiny-lr/node_modules/faye-websocket/spec/faye/websocket/client_spec.js
npm ERR! fstream_path /Users/karl/code/webcompat.com/node_modules/grunt-contrib-watch/node_modules/tiny-lr/node_modules/faye-websocket/spec/faye/websocket/client_spec.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 WARN excluding symbolic link query -> vendors/jquery/src/
npm ERR! Error: ENOENT, utime '/Users/karl/code/webcompat.com/node_modules/intern/node_modules/dojo/cldr/nls/pt-pt/buddhist.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://github.com/npm/npm/issues>

npm ERR! System Darwin 13.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/karl/code/webcompat.com
npm ERR! node -v v0.10.30
npm ERR! npm -v 1.4.21
npm ERR! path /Users/karl/code/webcompat.com/node_modules/intern/node_modules/dojo/cldr/nls/pt-pt/buddhist.js
npm ERR! fstream_path /Users/karl/code/webcompat.com/node_modules/intern/node_modules/dojo/cldr/nls/pt-pt/buddhist.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! fstream_finish_call utimes
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19
npm ERR! fstream_stack Object.oncomplete (evalmachine.<anonymous>:107:15)
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/karl/code/webcompat.com/npm-debug.log
npm ERR! not ok code 0

It is working if instead, we are using sudo for consistency we should modify the doc.

→ sudo npm install
npm WARN package.json webcompat@ No repository field.
npm WARN excluding symbolic link query -> vendors/jquery/src/

> optipng-bin@0.3.11 postinstall /Users/karl/code/webcompat.com/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-optipng/node_modules/optipng-bin
> node index.js

✔︎ pre-build test passed successfully!
npm WARN excluding symbolic link query -> vendors/jquery/src/

> pngquant-bin@0.3.5 postinstall /Users/karl/code/webcompat.com/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-pngquant/node_modules/pngquant-bin
> node index.js

✔︎ pre-build test passed successfully!

> jpegtran-bin@0.2.8 postinstall /Users/karl/code/webcompat.com/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/node_modules/jpegtran-bin
> node index.js

✔︎ pre-build test passed successfully!

> gifsicle@0.1.7 postinstall /Users/karl/code/webcompat.com/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-gifsicle/node_modules/gifsicle
> node index.js

✔︎ pre-build test passed successfully!

> intern@2.0.1 install /Users/karl/code/webcompat.com/node_modules/intern
> node support/fixdeps.js

grunt-contrib-watch@0.5.3 node_modules/grunt-contrib-watch
├── tiny-lr@0.0.4 (debug@0.7.4, faye-websocket@0.4.4, noptify@0.0.3, qs@0.5.6)
└── gaze@0.4.3 (globule@0.1.0)

grunt-contrib-jshint@0.7.2 node_modules/grunt-contrib-jshint
└── jshint@2.3.0 (console-browserify@0.1.6, minimatch@0.4.0, underscore@1.4.4, shelljs@0.1.4, cli@0.4.5)

grunt@0.4.5 node_modules/grunt
├── dateformat@1.0.2-1.2.3
├── which@1.0.5
├── eventemitter2@0.4.14
├── getobject@0.1.0
├── rimraf@2.2.8
├── colors@0.6.2
├── async@0.1.22
├── hooker@0.2.3
├── grunt-legacy-util@0.2.0
├── exit@0.1.2
├── lodash@0.9.2
├── nopt@1.0.10 (abbrev@1.0.5)
├── minimatch@0.2.14 (sigmund@1.0.0, lru-cache@2.5.0)
├── glob@3.1.21 (inherits@1.0.0, graceful-fs@1.2.3)
├── coffee-script@1.3.3
├── underscore.string@2.2.1
├── iconv-lite@0.2.11
├── findup-sync@0.1.3 (glob@3.2.11, lodash@2.4.1)
├── js-yaml@2.0.5 (esprima@1.0.4, argparse@0.1.15)
└── grunt-legacy-log@0.1.1 (underscore.string@2.3.3, lodash@2.4.1)

grunt-contrib-imagemin@0.7.2 node_modules/grunt-contrib-imagemin
├── pretty-bytes@0.1.2
├── async@0.7.0
├── chalk@0.4.0 (has-color@0.1.7, ansi-styles@1.0.0, strip-ansi@0.1.1)
└── imagemin@0.4.9 (stat-mode@0.2.0, ware@0.3.0, rimraf@2.2.8, tempfile@0.1.3, nopt@3.0.1, image-type@0.1.4, fs-extra@0.10.0, imagemin-svgo@0.1.1, imagemin-optipng@0.1.0, imagemin-pngquant@0.1.3, imagemin-jpegtran@0.1.0, imagemin-gifsicle@0.1.1)

intern@2.0.1 node_modules/intern
├── source-map@0.1.33 (amdefine@0.1.0)
├── leadfoot@1.0.1 (dojo@2.0.0-alpha1)
├── chai@1.9.1 (assertion-error@1.0.0, deep-eql@0.1.3)
├── digdug@1.0.0 (dojo@2.0.0-alpha1, decompress@0.2.3)
├── dojo@2.0.0-dev
└── istanbul@0.2.16 (abbrev@1.0.5, which@1.0.5, nopt@3.0.1, wordwrap@0.0.2, async@0.9.0, mkdirp@0.5.0, resolve@0.7.4, fileset@0.1.5, esprima@1.2.2, escodegen@1.3.3, handlebars@1.3.0, js-yaml@3.2.2)
karlcow commented 9 years ago

Hmm maybe not totally fixed. After the install is done, we get the following. Note the second request 404.

127.0.0.1 - - [08/Sep/2014 11:25:51] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [08/Sep/2014 11:25:51] "GET /css/webcompat.dev.css HTTP/1.1" 404 -
127.0.0.1 - - [08/Sep/2014 11:25:51] "GET /js/vendor/jquery-1.11.0.min.js HTTP/1.1" 200 -
127.0.0.1 - - [08/Sep/2014 11:25:51] "GET /js/vendor/lodash.underscore-min.js HTTP/1.1" 200 -
127.0.0.1 - - [08/Sep/2014 11:25:51] "GET /js/vendor/backbone-min.js HTTP/1.1" 200 -
127.0.0.1 - - [08/Sep/2014 11:25:51] "GET /js/vendor/moment-min.js HTTP/1.1" 200 -
127.0.0.1 - - [08/Sep/2014 11:25:51] "GET /js/vendor/prism.js HTTP/1.1" 200 -
127.0.0.1 - - [08/Sep/2014 11:25:51] "GET /js/vendor/mousetrap-min.js HTTP/1.1" 200 -
127.0.0.1 - - [08/Sep/2014 11:25:51] "GET /js/vendor/backbone.mousetrap.js HTTP/1.1" 200 -
127.0.0.1 - - [08/Sep/2014 11:25:51] "GET /js/vendor/marked-min.js HTTP/1.1" 200 -
127.0.0.1 - - [08/Sep/2014 11:25:51] "GET /js/lib/homepage.js HTTP/1.1" 200 -
127.0.0.1 - - [08/Sep/2014 11:25:51] "GET /js/lib/bugform.js HTTP/1.1" 200 -
127.0.0.1 - - [08/Sep/2014 11:25:51] "GET /js/lib/shared.js HTTP/1.1" 200 -
127.0.0.1 - - [08/Sep/2014 11:25:51] "GET /js/lib/diagnose.js HTTP/1.1" 200 -
127.0.0.1 - - [08/Sep/2014 11:25:51] "GET /img/step1icon.png HTTP/1.1" 200 -
127.0.0.1 - - [08/Sep/2014 11:25:51] "GET /img/step2icon.png HTTP/1.1" 200 -
127.0.0.1 - - [08/Sep/2014 11:25:51] "GET /img/step3icon.png HTTP/1.1" 200 -
127.0.0.1 - - [08/Sep/2014 11:25:52] "GET /api/issues/mine HTTP/1.1" 200 -
127.0.0.1 - - [08/Sep/2014 11:25:52] "GET /api/issues/needsdiagnosis HTTP/1.1" 200 -
127.0.0.1 - - [08/Sep/2014 11:25:52] "GET /api/issues/contactready HTTP/1.1" 200 -
127.0.0.1 - - [08/Sep/2014 11:25:52] "GET /api/issues/untriaged HTTP/1.1" 200 -
127.0.0.1 - - [08/Sep/2014 11:25:52] "GET /api/issues/sitewait HTTP/1.1" 200 -
karlcow commented 9 years ago

ok @magsout helped me to understand. We need to rewrite a bit the doc.

Basically after the install, we also need to run make dist, if you are not starting from 0.

magsout commented 9 years ago

Maybe add this line https://github.com/webcompat/webcompat.com/blob/master/Makefile#L19 directly here to run first compilation during installation ?

https://github.com/webcompat/webcompat.com/blob/master/Makefile#L7

magsout commented 9 years ago

I pushed this fixed https://github.com/webcompat/webcompat.com/commit/c37224f7983f1b4bd8fa2ca1cd29869ac5a23203 for this error

127.0.0.1 - - [08/Sep/2014 11:25:51] "GET /css/webcompat.dev.css HTTP/1.1" 404 -