CommandLineHeroes / hero-engine

Open-source HTML5 adventure game engine
MIT License
218 stars 66 forks source link

npm install not working #25

Closed deepaksood619 closed 5 years ago

deepaksood619 commented 5 years ago

This is the error i am facing while doing npm install in current master branch

 deepaksood@Deepaks-MacBook-Pro-2  ~/Experiments/hero-engine   master ●  npm install
npm WARN deprecated gulp-util@3.0.7: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js

> git-pre-commit@2.1.4 postinstall /Users/deepaksood/Experiments/hero-engine/node_modules/git-pre-commit
> gulp hooks:install

internal/modules/cjs/loader.js:583
    throw err;
    ^

Error: Cannot find module 'gulp-mocha'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/Users/deepaksood/Experiments/hero-engine/node_modules/git-pre-commit/gulp/tasks/tests.js:5:15)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! git-pre-commit@2.1.4 postinstall: `gulp hooks:install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the git-pre-commit@2.1.4 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/deepaksood/.npm/_logs/2018-10-24T15_34_46_163Z-debug.log
deepaksood619 commented 5 years ago

And this is the log inside the log file

4384 silly saveTree ├── phaser-animated-tiles@2.0.2
4384 silly saveTree └─┬ phaser@3.15.1
4384 silly saveTree   └── eventemitter3@3.1.0
4385 verbose stack Error: git-pre-commit@2.1.4 postinstall: `gulp hooks:install`
4385 verbose stack Exit status 1
4385 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
4385 verbose stack     at EventEmitter.emit (events.js:182:13)
4385 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
4385 verbose stack     at ChildProcess.emit (events.js:182:13)
4385 verbose stack     at maybeClose (internal/child_process.js:962:16)
4385 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
4385 verbose stack From previous event:
4385 verbose stack     at runAction (/usr/local/lib/node_modules/npm/lib/install/actions.js:74:13)
4385 verbose stack     at actions.(anonymous function) (/usr/local/lib/node_modules/npm/lib/install/actions.js:50:17)
4385 verbose stack     at execAction (/usr/local/lib/node_modules/npm/lib/install/actions.js:191:18)
4385 verbose stack From previous event:
4385 verbose stack     at withInit (/usr/local/lib/node_modules/npm/lib/install/actions.js:159:15)
4385 verbose stack From previous event:
4385 verbose stack     at withInit (/usr/local/lib/node_modules/npm/lib/install/actions.js:175:13)
4385 verbose stack     at runSerial (/usr/local/lib/node_modules/npm/lib/install/actions.js:158:10)
4385 verbose stack     at doSerial (/usr/local/lib/node_modules/npm/lib/install/actions.js:139:3)
4385 verbose stack     at Array.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
4385 verbose stack     at LOOP (/usr/local/lib/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
4385 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/slide/lib/chain.js:18:7
4385 verbose stack     at withInit.nodeify (/usr/local/lib/node_modules/npm/lib/install/actions.js:163:5)
4385 verbose stack     at runCallback (timers.js:694:18)
4385 verbose stack     at tryOnImmediate (timers.js:665:5)
4386 verbose pkgid git-pre-commit@2.1.4
4387 verbose cwd /Users/deepaksood/Experiments/hero-engine
4388 verbose Darwin 18.0.0
4389 verbose argv "/usr/local/Cellar/node/10.11.0/bin/node" "/usr/local/bin/npm" "install"
4390 verbose node v10.11.0
4391 verbose npm  v6.4.1
4392 error code ELIFECYCLE
4393 error errno 1
4394 error git-pre-commit@2.1.4 postinstall: `gulp hooks:install`
4394 error Exit status 1
4395 error Failed at the git-pre-commit@2.1.4 postinstall script.
4395 error This is probably not a problem with npm. There is likely additional logging output above.
4396 verbose exit [ 1, true ]
Venefilyn commented 5 years ago

Sometimes npm can be tricky, I can get it to work on my end. Try removing the node_modules folder and running npm install again as I know that solves a lot of issues.

@Jared-Sprague if you could, can you commit the package-lock.json after running npm install? As that can prevent some issues where people have different environments that don't work correctly

deepaksood619 commented 5 years ago

@SpyTec not able to npm install after removed node_modules too. Maybe after package-lock.json i will be able to do it.

Jared-Sprague commented 5 years ago

@mwcz Is it best practice to commit package-lock.json?

mwcz commented 5 years ago

@mwcz Yes, it should be committed to the repo.

npm's docs for package-lock

This file is intended to be committed into source repositories...

mwcz commented 5 years ago

@deepaksood619, could you post the output of npm version?

mwcz commented 5 years ago

@deepaksood619 Are you still experiencing this problem?

deepaksood619 commented 5 years ago

@mwcz After the current master pull npm install is working fine. Thanks