diegonetto / generator-ionic

Build hybrid mobile apps using the Ionic Framework
MIT License
1.74k stars 336 forks source link

sudo npm install -g generator-ionic blow up #261

Open nomdvlp opened 8 years ago

nomdvlp commented 8 years ago

I get this flood of errors when running sudo npm install -g generator-ionic, the confusion is killing me inside:

npm WARN generator-ionic@0.8.0 requires a peer of yo@>=1.0.0 but none was installed. npm ERR! Darwin 15.2.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "generator-ionic" npm ERR! node v4.2.4 npm ERR! npm v3.5.2 npm ERR! path /usr/local/lib/node_modules/.staging/abbrev-8ba0f614 npm ERR! code ENOENT npm ERR! errno -2 npm ERR! syscall rename

npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/abbrev-8ba0f614' -> '/usr/local/lib/node_modules/generator-ionic/node_modules/npm/node_modules/abbrev' npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/abbrev-8ba0f614' -> '/usr/local/lib/node_modules/generator-ionic/node_modules/npm/node_modules/abbrev' npm ERR! enoent This is most likely not a problem with npm itself npm ERR! enoent and is related to npm not being able to find a file. npm ERR! enoent

npm ERR! Please include the following file with any support request: npm ERR! /Users/donjohnson/npm-debug.log npm ERR! code 1 npm-debug.txt

venomberry commented 8 years ago

Hi, i have the same problem

C:\Users\Ghassen>npm install -g generator-ionic npm WARN engine cordova-js@3.8.0: wanted: {"node":"~0.10.x"} (current: {"node":" 4.2.4","npm":"3.3.12"}) npm WARN deprecated npmconf@0.1.16: this package has been reintegrated into npm and is now out of date with respect to npm npm WARN engine npm@1.3.4: wanted: {"node":">=0.6","npm":"1"} (current: {"node": "4.2.4","npm":"3.3.12"}) npm WARN engine xmlbuilder@2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: { "node":"4.2.4","npm":"3.3.12"}) npm WARN deprecated lodash-node@2.4.1: This package is no longer maintained. See its readme for upgrade details. npm WARN deprecated CSSselect@0.4.1: the module is now available as 'css-select'

npm WARN deprecated CSSwhat@0.4.7: the module is now available as 'css-what' npm WARN deprecated lodash@1.0.2: lodash@<2.0.0 is no longer maintained. Upgrade to lodash@^3.0.0 npm WARN install:rimraf@2.2.0 ENOENT: no such file or directory, chmod 'C:\Users \Ghassen\AppData\Roaming\npm\node_modules\generator-ionic\nodemodules\npm\node modules\rimraf\bin.js' C:\Users\Ghassen\AppData\Roaming\npm └── (empty)

npm WARN EPEERINVALID generator-ionic@0.8.0 requires a peer of yo@>=1.0.0 but no ne was installed. npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\generator-ionic\node_mod ules\npm\node_modules\cmd-shim with new installed version npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\generator-ionic\node_mod ules\npm\node_modules\read-package-json with new installed version npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\generator-ionic\node_mod ules\npm\node_modules\read-installed with new installed version npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\generator-ionic\node_mod ules\npm\node_modules\sha with new installed version npm WARN EBUNDLEOVERRIDE Replacing bundled node_modules\generator-ionic\node_mod ules\npm\node_modules\rimraf with new installed version npm ERR! code 1

can someone help me please ?!

evangboucher commented 8 years ago

I was able to resolve this issue by updating my NPM via: "sudo npm install -g npm" I then re-ran the generator installation and it succeeded (it still throws warning that "yo" v1.0.0 >= was not installed"). Hope it helps!

venomberry commented 8 years ago

Yes, it worked fine. But now, when i launch yo ionic, it stops at this level: " Which starter template would you like to use ? "

GarySwift commented 8 years ago

I'm having the same issue as GHA0991. It is now stalling on Which starter template would you like to use?

It doesn't matter if I use Sass, or tabs or sidemenu. I tried all variations.

I left it for 5 min or so and got the following error read ETIMEDOUT: Skipping cordova create

It is a newly created empty directory but it is also complaining about Current working directory is not a Cordova-based project.

Here is an example complete output fron the terminal.

Garys-iMac:Code mac$ mkdir yo-ionic-side-menu && cd $_
Garys-iMac:yo-ionic-side-menu mac$ yo ionic
    _             _
   (_)           (_)
    _  ___  _ __  _  ___
   | |/ _ \| '_ \| |/ __|
   | | (_) | | | | | (__
   |_|\___/|_| |_|_|\___|

? Would you like to use Sass with Compass (requires Ruby)? No
? Which Cordova plugins would you like to include? org.apache.cordova.device, org.apache.cordova.console, com.ionic.keyboard
? Which starter template would you like to use? Sidemenu
read ETIMEDOUT: Skipping `cordova create`

Install plugins registered at plugins.cordova.io: grunt plugin:add:org.apache.cordova.globalization
Or install plugins direct from source: grunt plugin:add:https://github.com/apache/cordova-plugin-console.git

Installing selected Cordova plugins, please wait.
{ [CordovaError: Current working directory is not a Cordova-based project.]
  name: 'CordovaError',
  message: 'Current working directory is not a Cordova-based project.' }
✖ Please run `yo ionic` in an empty directory, or in that of an already existing cordova project.
Garys-iMac:yo-ionic-side-menu mac$ 
jafaripur commented 8 years ago

I have same issue in installing!!

siathalysedI commented 8 years ago

Use version 2.x.x as in https://github.com/mwaylabs/generator-m-ionic/issues/257#issuecomment-142270378

VGerris commented 8 years ago

it may be a npm issue. I reinstalled using the installer from the website which kept node 4.2.6 where I was on but downgraded npm from 3.6.0 to 2.14.12. That fixed the issues I had with a simple cordova install. Seems to me something is broken in the newer version.

linslin commented 8 years ago

Same issue for me. Downgrading to the latest 2.x.x version fixed this problem.

npm install -g npm@latest-2

Is there a fix in planning?

armatoste commented 8 years ago

It's fixed my generator-ionic @linslin . Thanks a lot buddy!

roboflank commented 8 years ago

Having the same issue with npm v3.3.12

subbuballa commented 8 years ago

@linslin solution worked for me as well..thanks..

erdem333 commented 8 years ago

@linslin worked very well. Thanks!

chiragandroid commented 8 years ago

i have the same issue . using Ubuntu 14.04