mcfly-io / generator-mcfly

A Yeoman generator for scaffolding an application using angular, browserify, ionic and famous
324 stars 43 forks source link

Error installing #148

Closed fcristel closed 9 years ago

fcristel commented 9 years ago

Hi

I'm having an issue installing on a Windows 7, x64 machine. I'm getting an ELIFECYCLE error.

npm ERR! node v0.12.1 npm ERR! npm v2.5.1 npm ERR! code ELIFECYCLE

npm ERR! generator-angular-famous-ionic@1.3.14 preinstall: bash ./bin/prepublish.sh npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the generator-angular-famous-ionic@1.3.14 preinstall script 'bash ./bin/prepublish.sh'.

You can see the log here: https://gist.github.com/fcristel/0735b090242233e0deab

thaiat commented 9 years ago

what is your version for node and npm ?

fcristel commented 9 years ago

Hi. It's just there in the question. Node 0.12.1, Npm 2.5.1. I had node 0.12.0 before and updated to 0.12.1, to see if that was the problem, but still received the same result.

Thank you

thaiat commented 9 years ago

try downgrading to node 0.10.37 to see if this is causing the issue also do you have bash installed on windows ?

thaiat commented 9 years ago

@fcristel the issue is coming from bash

fcristel commented 9 years ago

I've downgraded node to 0.10.37, and in cmd still the same error. Then I've installed Cygwin and with the help of it, I've correctly installed the generator. At this point I tried to generate an app in the cmd and failed.

Then, updated node back to 0.12.1 and tried to generate the app with the help of Cygwin. It seemed like everything was working ok, but I see that the process kind of stopped executing "bash ./bin/prepublish.sh". It seems like it doesn't stop, just consuming memory (node.exe process is at 1.2Gb of RAM) and disk space (working directory is at 210Mb (312Mb on disk)). it's been more that half of hour now executing that command, and still no response.

Thank you.

jskrzypek commented 9 years ago

Can you tell us what versions of bash & cygwin you're running?

I found this stackoverflow question which makes me think there may be an issue with with your default environment variables that is making the set -e in the ./bin/prepublish.sh script blow up.

Based on that can you run the following in your cygwin environment and tell us what the output is?

echo "SHELLOPTS=$SHELLOPTS"
echo "BASHOPTS=$BASHOPTS"
jskrzypek commented 9 years ago

@fcristel Also was there other output before you hit the npm ELIFECYCLE error?

It would be useful to know where in the prepublish script the bug is occurring.

fcristel commented 9 years ago

I installed the latest Cygwin, 1.7.35, bash --version : GNU bash, versión 4.3.33(1)-release (x86_64-unknown-cygwin)

SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor

BASHOPTS=cmdhist:complete_fullquote:expand_aliases:extquote:force_fignore:hostcomplete:interactive_comments:login_shell:progcomp:promptvars:sourcepath

I've just restarted Windows. Let me see if I have different output now.

jskrzypek commented 9 years ago

Cool let us know. Were you able to successfully install any previous versions of generator-angular-famous-ionic on your setup?

fcristel commented 9 years ago

Same result. This is the output. It doesn't go any further...

create package.json create bower.json create .bowerrc create karma.conf.js create protractor.conf.js create bin\prepublish.sh create bin\protractor-fix-version.js create bin\cordova-generate-icons create bin\cordova-generate-splashes create client.eslintrc create client\index.html create client\404.html create client\robots.txt create client\favicon.ico create client\styles\main.scss create client\scripts\main.js create client\scripts\main.test.js create test\e2e\e2e.test.js create test\e2e.eslintrc create test\mocha\helpers\globals.js create test\unit\polyfill.js create test\unit\unitHelper.js create .jshintrc create .jscsrc create .eslintrc create .eslintignore create .tern-project create .jsbeautifyrc create .gitignore create shippable.yml create .travis.yml create readme.md create .settings create .codio create gulpfile.js create gulp_tasks\common\constants.js create gulp_tasks\common\helper.js create gulp_tasks\tasks\lint.js create gulp_tasks\tasks\serve.js create gulp_tasks\tasks\browserify.js create gulp_tasks\tasks\release.js create gulp_tasks\tasks\changelog.js create gulp_tasks\common\changelog-script.js create gulp_tasks\tasks\test.js create gulp_tasks\tasks\style.js create gulp_tasks\tasks\dist.js npm WARN package.json ionapptest1@0.0.1 No repository field. npm WARN engine karma@0.12.31: wanted: {"node":"~0.8 || ~0.10"} (current: {"node":"0.12.1","npm":"2.5.1"})

gulp-mux@0.2.4 preinstall C:\Proyecto\ionic-tutorial\generator-angular-famous-ionic-test1\node_modules\gulp-mux bash ./bin/prepublish.sh

fcristel commented 9 years ago

No, this is my first attempt on using this generator. And I think I will switch to a Linux environment better, because it doesn't seem to get along with Windows very well :)

jskrzypek commented 9 years ago

Oh ok, so you are able to install the generator with npm? I was under the impression that not being able to install the generator itself was your issue.

jskrzypek commented 9 years ago

If the generator is failing to finish running when you run yo angular-famous-ionic then there may be a workaround.

jskrzypek commented 9 years ago

Try running yo angular-famous-ionic --skip-install (not --no-install like I mistakenly wrote before)

jskrzypek commented 9 years ago

If that succeeds then make sure you have all of the following npm packages installed globally:

bower
istanbul
mocha
karma-cli
gulp
codeclimate-test-reporter
browserify
watchify
cordova
ionic

You can use npm list -g --depth=0 to check what's installed globally and then just npm install -g <package-name> on whatever you're missing from that list.

After you check to make sure you've got everything you need installed, then in your project directory run npm install && bower install. If the command still fails at that point then I'll be happy to look into it a bit further with you tomorrow. What time zone are you in, in case it works to do a skype chat?

jskrzypek commented 9 years ago

Sorry I made a mistake, use --skip-install not --no-install

fcristel commented 9 years ago

Ok. I'll try that tomorrow and get back to you. I'm from Spain. Thank you.

fcristel commented 9 years ago

Same output using the --skip-install option. I've also installed the packages I was missing from your list and no luck. Thank you for the assistance and your time. I will set up a Linux environment and give it a try in there. I just can't spend more time with it on Windows right now.

jskrzypek commented 9 years ago

Ok, not a problem. If you get it working in Linux you can go ahead and close this issue.

thaiat commented 9 years ago

@fcristel any update ? Could you try the following on windows:

fcristel commented 9 years ago

Hi. I didn't have time to set up a new linux environment yet. I just tried this in Windows: Install generator-sublime (was it necessary?), removed that line from prepublish.sh and execute "yo angular-famous-ionic" again in a new folder. The result is more or less the same. I mean it still stops at that point in the execution:

gulp-mux@0.2.4 preinstall C:\Proyecto\ionic-tutorial\generator-angular-famous-ionic-test1\node_modules\gulp-mux bash ./bin/prepublish.sh

, but now if you press CTRL+C to break the execution, it continues, and at some point it generates a log file. It's this one: https://gist.github.com/fcristel/d58858f3b918e1c46b40

thaiat commented 9 years ago

are you available for a teamviewer ?

thaiat commented 9 years ago

if not remove this lines in both generator-angular-famous-ionic and generator-sublime: in their package.json

"preinstall": "bash ./bin/prepublish.sh",
jskrzypek commented 9 years ago

You should also possibly try to do the same with gulp-mux, since that's where it looks like it's hitting the error. It's tricky to do since it's expecting gulp-mux to be a local repo.

One way to do this would be by cloning gulp-mux locally from http://github.com/thaiat/gulp-mux, changing the package.json file there, and then using npm link in the gulp-mux folder. Then create the folder where you're going to try to run the generator and before running it, run npm link gulp-mux. This will make a sym-link inside the test folder's node_modules folder to the local version of gulp-mux that you edited. After this when you run the generator, it should see that you already have gulp-mux@0.2.4 installed locally and shouldn't bother with trying to install or run the pre-install script.

fcristel commented 9 years ago

Hi. I removed that line from the generators, and still the same effect. I haven't tried it with gulp-mux yet, but I'm waiting for a fresh environment and I'll try it there. Thank you both for the support. I will close this one, and if I find any problems in Linux, I'll open another one. Cheers!

thaiat commented 9 years ago

@fcristel i have removed completly the script from generator-sublime, gulp-mux, and generator-angular-famous-ionic, can do the following:

and give a try to yo angular-famous-ionic ?

Cheers

Avi

fcristel commented 9 years ago

Hi Avi

Sorry for not getting back earlier. I was away these days.

Ok, I did all the steps and it still fails. This time it fails with an error. Here is the log: https://gist.github.com/fcristel/7b0f475211ae69d99dc8

, and this is the output from cygwin: https://gist.github.com/fcristel/4f2012c663aad7f8e7ba

thaiat commented 9 years ago

your version of node is 0.12 as you can see in the log. Can you try with 0.10?

fcristel commented 9 years ago

I've installed node 0.10.37, uninstall the generator, and when I tried to install it again, it fails. npm is 1.4.28

npm ERR! fetch failed https://registry.npmjs.org/lodash-deep/-/lodash-deep-1.4.2.tgz

v8flags@1.0.8 install C:\Users\Cristian\AppData\Roaming\npm\node_modules\generator-angular-famous-ionic\node_modules\gulp\node_modules\v8flags node fetch.js

npm ERR! fetch failed https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz npm ERR! fetch failed https://registry.npmjs.org/caseless/-/caseless-0.9.0.tgz npm ERR! fetch failed https://registry.npmjs.org/minimatch/-/minimatch-2.0.4.tgz npm ERR! fetch failed https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.7.3.tgz npm ERR! fetch failed https://registry.npmjs.org/is-bzip2/-/is-bzip2-1.0.0.tgz npm ERR! fetch failed https://registry.npmjs.org/timed-out/-/timed-out-2.0.0.tgz npm ERR! fetch failed https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz npm ERR! fetch failed https://registry.npmjs.org/sigmund/-/sigmund-1.0.0.tgz npm ERR! fetch failed https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-1.0.0.tgz npm WARN package.json myRESTfulApp@0.1.0 No repository field. npmgenerator-sublime@1.5.10 C:\Users\Cristian\AppData\Roaming\npm\node_modules\generator-sublime ├── q@1.1.2 ├── strip-json-comments@1.0.2 ├── lodash@2.4.1 ├── shelljs@0.3.0 ├── github@0.2.3 ├── chalk@0.5.1 (ansi-styles@1.1.0, escape-string-regexp@1.0.3, supports-color@0.2.0, strip-ansi@0.3.0, has-ansi@0.1.0) ├── yosay@1.0.2 (string-length@1.0.0, ansi-regex@1.1.1, ansi-styles@2.0.1, word-wrap@1.0.2, strip-ansi@2.0.1, pad-component@0.0.1, minimist@1.1.1, taketalk@1.0.0) ├── update-notifier@0.3.0 (is-npm@1.0.0, string-length@1.0.0, semver-diff@2.0.0, latest-version@1.0.0, configstore@0.3.2) └── yeoman-generator@0.17.7 (dargs@2.1.0, diff@1.3.2, class-extend@0.1.1, underscore.string@2.4.0, text-table@0.2.0, mime@1.3.4, async@0.9.0, rimraf@2.3.2, isbinaryfile@2.0.3, debug@1.0.4, iconv-lite@0.4.7, cross-spawn@0.2.8, grouped-queue@0.3.0, mkdirp@0.5.0, nopt@3.0.1, run-async@0.1.0, findup-sync@0.1.3, github-username@1.1.1, file-utils@0.2.2, glob@4.5.3, gruntfile-editor@0.2.0, cheerio@0.17.0, request@2.55.0, download@1.0.7, inquirer@0.7.3)

generator-angular-famous-ionic@1.3.16 C:\Users\Cristian\AppData\Roaming\npm\node_modules\generator-angular-famous-ionic ├── glob-to-regexp@0.0.2 ├── q@1.1.2 ├── shelljs@0.3.0 ├── lodash@2.4.1 ├── chalk@0.5.1 (escape-string-regexp@1.0.3, ansi-styles@1.1.0, supports-color@0.2.0, strip-ansi@0.3.0, has-ansi@0.1.0) ├── yosay@1.0.2 (string-length@1.0.0, ansi-regex@1.1.1, ansi-styles@2.0.1, word-wrap@1.0.2, strip-ansi@2.0.1, pad-component@0.0.1, minimist@1.1.1, taketalk@1.0.0) ├── del@1.1.1 (is-path-cwd@1.0.0, object-assign@2.0.0, each-async@1.1.1, is-path-in-cwd@1.0.0, globby@1.2.0, rimraf@2.3.2) ├── gulp@3.8.10 (interpret@0.3.10, deprecated@0.0.1, pretty-hrtime@0.2.2, archy@1.0.0, minimist@1.1.1, semver@4.3.3, v8flags@1.0.8, tildify@1.0.0, orchestrator@0.3.7, liftoff@0.13.6, vinyl-fs@0.3.13, gulp-util@3.0.4) ├── gulp-inject@1.1.1 (event-stream@3.3.0, gulp-util@3.0.4) ├── gulp-mux@0.2.5 (randomstring@1.0.3, run-sequence@1.0.2, lodash-deep@1.4.2, yargs@3.5.4, gulp-util@3.0.2) ├── yeoman-generator@0.17.7 (dargs@2.1.0, rimraf@2.3.2, class-extend@0.1.1, diff@1.3.2, text-table@0.2.0, underscore.string@2.4.0, mime@1.3.4, async@0.9.0, isbinaryfile@2.0.3, iconv-lite@0.4.7, cross-spawn@0.2.8, debug@1.0.4, nopt@3.0.1, mkdirp@0.5.0, run-async@0.1.0, grouped-queue@0.3.0, file-utils@0.2.2, glob@4.5.3, gruntfile-editor@0.2.0, cheerio@0.17.0, findup-sync@0.1.3, github-username@1.1.1, request@2.55.0, download@1.0.7, inquirer@0.7.3) └── update-notifier@0.3.0 (is-npm@1.0.0, semver-diff@2.0.0, string-length@1.0.0, latest-version@1.0.0, configstore@0.3.2) WARN unmet dependency C:\Users\Cristian\AppData\Roaming\npm\node_modules\mean-cli\node_modules\inquirer requires chalk@'^1.0.0' but will load npm WARN unmet dependency C:\Users\Cristian\AppData\Roaming\npm\node_modules\mean-cli\node_modules\chalk, npm WARN unmet dependency which is version 0.5.1 npm WARN unmet dependency C:\Users\Cristian\AppData\Roaming\npm\node_modules\mean-cli\node_modules\inquirer requires lodash@'^3.3.1' but will load npm WARN unmet dependency C:\Users\Cristian\AppData\Roaming\npm\node_modules\mean-cli\node_modules\lodash, npm WARN unmet dependency which is version 2.4.1 npm WARN unmet dependency C:\Users\Cristian\AppData\Roaming\npm\node_modules\mean-cli\node_modules\bower\node_modules\inquirer requires chalk@'^0.5.0' but will load npm WARN unmet dependency C:\Users\Cristian\AppData\Roaming\npm\node_modules\mean-cli\node_modules\bower\node_modules\chalk, npm WARN unmet dependency which is version 1.0.0

thaiat commented 9 years ago

try do a npm install -g npm check what is your version of node and npm after that and try install again.

otherwise try to install on a new windows computer, i really don't understand the kind of errors you get, it looks like fetching from npm is failing ....