mirabeau-nl/frontend-boilerplate

npm failing to install all dependencies

cstegeman opened this issue · 9 comments

Hi,

I've cloned frontend bootstrap and am trying to run npm install. Which is unsuccessful, I added a log below. Can you point me to a solution?

This is the same on windows and on mac.

npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat '/Users/christiaanstegeman/Documents/frontend-bootstrap/node_modules/browser-sync/node_modules/eazy-logger/node_modules/opt-merger/node_modules/lodash/lodash.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 14.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/christiaanstegeman/Documents/frontend-bootstrap
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! path /Users/christiaanstegeman/Documents/frontend-bootstrap/node_modules/browser-sync/node_modules/eazy-logger/node_modules/opt-merger/node_modules/lodash/lodash.js
npm ERR! fstream_path /Users/christiaanstegeman/Documents/frontend-bootstrap/node_modules/browser-sync/node_modules/eazy-logger/node_modules/opt-merger/node_modules/lodash/lodash.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 (fs.js:107:15)
npm ERR! Error: ENOENT, lstat '/Users/christiaanstegeman/Documents/frontend-bootstrap/node_modules/browser-sync/node_modules/socket.io/node_modules/socket.io-parser/bg.gif'
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 14.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/christiaanstegeman/Documents/frontend-bootstrap
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! path /Users/christiaanstegeman/Documents/frontend-bootstrap/node_modules/browser-sync/node_modules/socket.io/node_modules/socket.io-parser/bg.gif
npm ERR! fstream_path /Users/christiaanstegeman/Documents/frontend-bootstrap/node_modules/browser-sync/node_modules/socket.io/node_modules/socket.io-parser/bg.gif
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 (fs.js:107:15)

ws@0.5.0 install /Users/christiaanstegeman/Documents/frontend-bootstrap/node_modules/browser-sync/node_modules/socket.io/node_modules/engine.io/node_modules/ws
(node-gyp rebuild 2> builderror.log) || (exit 0)

Error: ENOENT, lstat '[...]/node_modules/browser-sync/node_modules/eazy-logger/node_modules/opt-merger/node_modules/lodash/lodash.js'

It seems lodash is failing to install.

Does the problem persist with updated versions of Node.js and NPM? Latest Node.js 0.10 branch is 0.10.38 and NPM is 2.10.0. Updating Node.js needs a download, updating npm is as easy as npm i npm -g.

Another question; does it also fail when you try to run npm i browser-sync in an entirely other directory? And how about npm i ws in another directory? And npm i lodash? I'd like to know the offending package.

I can't reproduce this myself, tested on Node v0.10.26 and NPM v1.4.3 on Windows and on OSX with Node v0.10.38 and NPM 2.10.0.

I updated node and npm to the latest versions you mentioned on windows and on mac. Still not working. I'm going to try a different method tomorrow and update the outcome here.

@cstegeman does this problem still occur with the latest version. If not then this issue can be closed.

Don't know haven't tried it since then

@cstegeman can you do this so we can take action one this issue.

Seems to work almost:

After doing a clean checkout and running npm i:
[fsevents] Success: "/Users/cstegeman/Documents/Checkouts/frontend-bootstrap/node_modules/browser-sync/node_modules/chokidar/node_modules/fsevents/lib/binding/Release/node-v14-darwin-x64/fse.node" is installed via remote

frontend-bootstrap@1.0.0 postinstall /Users/cstegeman/Documents/Checkouts/frontend-bootstrap
node node_modules/gulp/bin/gulp.js githooks

{ [Error: ENOENT, no such file or directory '.env'] errno: -2, code: 'ENOENT', path: '.env', syscall: 'open' }
[16:13:49] Using gulpfile ~/Documents/Checkouts/frontend-bootstrap/gulpfile.js
[16:13:49] Starting 'githooks-clean'...
[16:13:49] Finished 'githooks-clean' after 26 ms
[16:13:49] Starting 'githooks'...
[16:13:49] Finished 'githooks' after 17 ms
dotenv@1.2.0 node_modules/dotenv

After running gulp dev:

Snijbiet:frontend-bootstrap cstegeman$ gulp dev
{ [Error: ENOENT, no such file or directory '.env'] errno: -2, code: 'ENOENT', path: '.env', syscall: 'open' }
[16:24:25] Using gulpfile ~/Documents/Checkouts/frontend-bootstrap/gulpfile.js
[16:24:25] Starting 'clean'...
[16:24:25] Finished 'clean' after 2.39 ms
[16:24:25] Starting 'browsersync'...
[16:24:25] Finished 'browsersync' after 37 ms
[16:24:25] Starting 'html-compile'...
[16:24:25] Starting 'img-optimize'...
[16:24:25] Starting 'css-compile'...
[16:24:25] Starting 'css-compile-sass'...
[16:24:25] Starting 'css-copy-fonts'...
[16:24:25] Starting 'js-transpile'...
[16:24:25] Finished 'css-compile' after 18 ms
[16:24:25] Starting 'css-watch'...
[16:24:25] Finished 'css-watch' after 7.08 ms
[16:24:25] Finished 'css-copy-fonts' after 28 ms
[BS] Access URLs:


   Local: http://localhost:3000
External: http://172.20.35.144:3000

      UI: http://localhost:3001

UI External: http://172.20.35.144:3001


[BS] Serving files from: ./dist
[BS] 1 file changed (home.html)
[16:24:26] Finished 'html-compile' after 884 ms
[16:24:26] Starting 'html-watch'...
[16:24:26] Finished 'html-watch' after 1.88 ms
[16:24:26] gulp-imagemin: Minified 1 image (saved 3.43 kB - 5.9%)
[BS] 1 file changed (all.css)
[16:24:26] Finished 'css-compile-sass' after 1.36 s
[16:24:26] Finished 'img-optimize' after 1.4 s
[16:24:26] Starting 'img-watch'...
[16:24:26] Finished 'img-watch' after 1.7 ms
[BS] 30 files changed (main.js.map, main.js, conditioner.js.map, conditioner.js, require.js.map, require.js, connection.js.map, connection.js, element.js.map, element.js, media.js.map, media.js, pointer.js.map, pointer.js, window.js.map, window.js, Observer.js.map, Observer.js, Promise.js.map, Promise.js, contains.js.map, contains.js, extendClassOptions.js.map, extendClassOptions.js, matchesSelector.js.map, matchesSelector.js, mergeObjects.js.map, mergeObjects.js, Nav.js.map, Nav.js)
[16:24:27] Finished 'js-transpile' after 1.68 s
[16:24:27] Starting 'js-watch'...
[16:24:27] Finished 'js-watch' after 1.67 ms
[16:24:27] Starting 'dev'...
[16:24:27] Finished 'dev' after 4.92 μs

This error is caused because of a missing .env file @ericweerstra is working on a fix for this issue.

As @awolkers said, the missing .env file is a different issue, and it's also not blocking for installing the dependencies.