rblopes / generator-phaser-plus

[🛑 DISCONTINUED] It has been a long journey but development of `generator-phaser-plus` is now over. I recommend you have a look and fork `yandeu/phaser-project-template` instead.
https://github.com/yandeu/phaser-project-template
MIT License
144 stars 14 forks source link

Failed to set-up fully #6

Closed budda closed 8 years ago

budda commented 8 years ago

I just gave it a go slush phaser-plus and npm packed in with the following errors:

npm ERR! Darwin 14.5.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.7
npm ERR! npm  v2.14.1

npm ERR! Callback called more than once.
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/mike/Code/blox/npm-debug.log
[03:32:27] npm exited with non-zero code 1 , run `npm install` manually
events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: npm exited with non-zero code 1
    at ChildProcess.<anonymous> (/usr/local/lib/node_modules/slush-phaser-plus/node_modules/gulp-install/lib/commandRunner.js:14:19)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1015:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1087:5)

Any ideas?

rblopes commented 8 years ago

Does that happen all the time? If you run slush phaser-plus again, does that give you the same error? If you run npm install manually in the created project, does that complete normally?

budda commented 8 years ago

I did an npm install inside the previously created directory and it finished with no output to the terminal at all. Is that expected @rblopes ?

budda commented 8 years ago

I created a new directory and re-ran slush phaser-plus and it failed exactly the same again.

The npm log tail contained:

$ tail /Users/mike/Code/blox2/npm-debug.log
81760 error errno ECONNRESET
81761 error syscall read
81762 error network read ECONNRESET
81762 error network This is most likely not a problem with npm itself
81762 error network and is related to network connectivity.
81762 error network In most cases you are behind a proxy or have bad network settings.
81762 error network
81762 error network If you are behind a proxy, please make sure that the
81762 error network 'proxy' config is set properly.  See: 'npm help config'
81763 verbose exit [ 1, true ]

Scrolling back through the output during project creation I did see the npm error just after the Preload.js file is created the output continues with...

> utf-8-validate@1.2.1 install /Users/mike/Code/blox2/node_modules/browser-sync/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate
> node-gyp rebuild

  CXX(target) Release/obj.target/validation/src/validation.o
-
  SOLINK_MODULE(target) Release/validation.node
npm ERR! Darwin 14.5.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.7
npm ERR! npm  v2.14.1
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! syscall read
npm ERR! network read ECONNRESET
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

> bufferutil@1.2.1 install /Users/mike/Code/blox2/node_modules/browser-sync/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil
> node-gyp rebuild

Any help ?

rblopes commented 8 years ago

It's confusing, right?

If npm install does not report anything may be because all downloaded stuff are already there. Check if node_modules have the required libraries installed (or use npm ls --depth 0 for a concise listing) and try running npm start on that first project. If all goes well, the project is ready for editing. It would be cool if npm reported that everything is OK and up to date.

These “Callback called more than once” messages may happen due to some obscure race conditions within npm and are npm issues, mostly. Remember that running npm install should report what packages it downloaded and installed in your project — if much, complaining about some incompatible (and optional) packages too. You may have missed them when you got those errors, but don't worry, that's fine.

As for the ECONNRESET stuff, may be due connection instabilities from npm and, despite frustrating, are nothing to worry much too. But, since these break the installation process, you do need to npm install again to concluse the installation process. Of course, if you got a working project in the first attempt, you won't need that.

rblopes commented 8 years ago

Hi, have you managed to get your project working? Any progress?

budda commented 8 years ago

Sorry been busy with something complete different. Answers to your questions:

$ npm ls --depth 0
├── audiosprite@0.5.0
├── autoprefixer@6.0.3
├── babelify@6.3.0
├── browser-sync@2.9.6
├── browserify@11.2.0
├── del@2.0.2
├── estraverse@4.1.0
├── gulp@3.9.0
├── gulp-cached@1.1.0
├── gulp-concat@2.6.0
├── gulp-eslint@1.0.0
├── gulp-filter@3.0.1
├── gulp-hb@2.6.3
├── gulp-less@3.0.3
├── gulp-load-plugins@0.10.0
├── gulp-minify-css@1.2.1
├── gulp-notify@2.2.0
├── gulp-postcss@6.0.0
├── gulp-processhtml@1.1.0
├── gulp-rename@1.2.2
├── gulp-sourcemaps@1.5.2
├── gulp-uglify@1.4.1
├── gulp-util@3.0.6
├── lodash.assign@3.2.0
├── phaser@2.4.3
├── postcss@5.0.8
├── require-dir@0.3.0
├── vinyl-buffer@1.0.0
├── vinyl-source-stream@1.1.0
└── watchify@3.4.0

Running npm start worked nicely.

Regarding the ECONNRESET messages, I created a fresh directory and kicked off a new slush phaser-plus followed by an npm start and it worked flawlessly tonight!

Case closed? It's NPM being a bag of arse at times... :)