Updating to ionic 2.1.18 failed #1805

Open
jgw96 opened this Issue Dec 22, 2016 · 20 comments

Projects

None yet
@jgw96
Member
jgw96 commented Dec 22, 2016

From @adirzoari on December 22, 2016 21:37

Ionic version:2
I'm submitting a bug report & support request.

I'm trying to update ionic 2 version by these commands
npm uninstall cordova ionic
npm install -g cordova ionic

i get these error
C:\Users\adirz\myapps\starter-super>npm install -g cordova ionic npm WARN deprecated node-uuid@1.4.7: use uuid module instead 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 minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue 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 node-uuid@1.3.3: use uuid module instead C:\Users\adirz\AppData\Roaming\npm-- cordova@6.4.0
`-- insight@0.8.4

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\ionic\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN In ionic@2.1.18 replacing bundled version of cross-spawn with cross-spawn@4.0.2
npm WARN In ionic@2.1.18 replacing bundled version of mime-types with mime-types@2.0.14
npm WARN In ionic@2.1.18 replacing bundled version of semver with semver@4.2.0
npm WARN In ionic@2.1.18 replacing bundled version of form-data with form-data@0.2.0
npm WARN In ionic@2.1.18 replacing bundled version of request with request@2.51.0
npm WARN In ionic@2.1.18 replacing bundled version of ionic-app-lib with ionic-app-lib@2.1.9
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\adirz\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "-g" "cordova" "ionic"
npm ERR! node v6.9.1
npm ERR! npm v4.0.2
npm ERR! path C:\Users\adirz\AppData\Roaming\npm\node_modules.staging\ansi-f8e54430
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename

npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\adirz\AppData\Roaming\npm\node_modules.staging\ansi-f8e54430' -> 'C:\Users\adirz\AppData\Roaming\npm\node_modules\ionic\node_mod
ules\cordova-lib\node_modules\ansi'
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\adirz\AppData\Roaming\npm\node_modules.staging\ansi-f8e54430' -> 'C:\Users\adirz\AppData\Roaming\npm\node_modules\ionic\node_mod
ules\cordova-lib\node_modules\ansi'
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! C:\Users\adirz\myapps\אפליקציות טובות להשתמש\starter-super\npm-debug.log

C:\Users\adirz\myapps\starter-super>ionic -v
'ionic' is not recognized as an internal or external command,
operable program or batch file.

00
Update NowLaterRelease Notes
Info`

In addition it says ionic is not recognized
'ionic' is not recognized as an internal or external command,
operable program or batch file.

Copied from original issue: driftyco/ionic#9766

@jgw96 jgw96 referenced this issue in driftyco/ionic Dec 22, 2016
Closed

Updating to ionic 2.1.18 failed #9766

@waybackrider

Same Problem here, cause was npm version 3.10.5 .
Updating npm to latest 4.x fixed it

@waybackrider

npm is now 4.0.5

@john5db
john5db commented Dec 23, 2016 edited

I updated to npm 4.0.5
But still not working

npm ERR! node v6.9.2 npm ERR! npm v4.0.5

@patwaswapnil

npm install -g npm@latest before npm install -g ionic@latest worked for me.

@richardshergold
richardshergold commented Dec 23, 2016 edited

I'm having this problem too. I have node 7.2.1 and npm 4.0.5

(I'm stuck now as I no longer have Ionic installed and can't re-install it)

From my terminal:

richardshergold$ sudo npm install -g ionic@latest
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 minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
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 node-uuid@1.4.7: use uuid module instead
npm WARN deprecated node-uuid@1.3.3: use uuid module instead
/usr/local/lib
└── (empty)

npm WARN In ionic@2.1.18 replacing bundled version of cross-spawn with cross-spawn@4.0.2
npm WARN In ionic@2.1.18 replacing bundled version of semver with semver@4.2.0
npm WARN In ionic@2.1.18 replacing bundled version of mime-types with mime-types@2.0.14
npm WARN In ionic@2.1.18 replacing bundled version of form-data with form-data@0.2.0
npm WARN In ionic@2.1.18 replacing bundled version of request with request@2.51.0
npm WARN In ionic@2.1.18 replacing bundled version of ionic-app-lib with ionic-app-lib@2.1.9
npm ERR! Darwin 16.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "ionic@latest"
npm ERR! node v7.2.1
npm ERR! npm v4.0.5
npm ERR! path /usr/local/lib/node_modules/.staging/ansi-392b32ed
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/ansi-392b32ed' -> '/usr/local/lib/node_modules/ionic/node_modules/cordova-lib/node_modules/ansi'
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/ansi-392b32ed' -> '/usr/local/lib/node_modules/ionic/node_modules/cordova-lib/node_modules/ansi'
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/richardshergold/Ionic Projects/npm-debug.log

in debug.log I have:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'info' ]
2 info using npm@4.0.5
3 info using node@v7.2.1
4 verbose stack Error: Invalid package.json
4 verbose stack at /usr/local/lib/node_modules/npm/lib/view.js:84:30
4 verbose stack at ReadFileContext. (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:90:21)
4 verbose stack at ReadFileContext.callback (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:78:16)
4 verbose stack at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:335:13)
5 verbose cwd /Users/richardshergold/Ionic Projects
6 error Darwin 16.3.0
7 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "info"
8 error node v7.2.1
9 error npm v4.0.5
10 error Invalid package.json
11 error If you need help, you may report this error at:
11 error https://github.com/npm/npm/issues
12 verbose exit [ 1, true ]

@richardshergold

Solved it. I had to uninstall cordova as wel as ionic. The install worked find after that.

@dtrujo
dtrujo commented Dec 23, 2016

I have the same problem. I uninstall ionic and now i can install the new version.

@adirzoari

@richardshergold i'm really confusing. it's shows me different npm version in different folders and not in each folder the ionic works

see here

C:\Users\adirz>npm -v
4.0.5

C:\Users\adirz>ionic -v
2.1.18

C:\Users\adirz>cd myapps

C:\Users\adirz\myapps>cd haversami

C:\Users\adirz\myapps\HaverSami>npm -v
3.10.9

C:\Users\adirz\myapps\HaverSami>ionic -v
'ionic' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\adirz\myapps\HaverSami>

@richardshergold

@adirzoari i'm not really an expert on this sort of stuff. Did you try globally uninstalling ionic and cordova and then re-installing (globally). It works for me now.

@adirzoari

@richardshergold what commands please?

@richardshergold

@adirzoari
This is what I did:

npm uninstall -g cordova
npm uninstall -g ionic
sudo npm install -g cordova ionic

@john5db
john5db commented Dec 23, 2016 edited

@richardshergold
Thanks for trick
It is working now.

@adirzoari
You must uninstall ionic & cardova

If not worked update node to v 6.9.2
and try
npm uninstall -g cordova
npm uninstall -g ionic
sudo npm install -g cordova ionic

@olavocneto
ionic info

Your system information:

Cordova CLI: 6.4.0 
Ionic CLI Version: 2.1.18
Ionic App Lib Version: 2.1.9
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 4.4
Node Version: v7.3.0
Xcode version: Not installed
npm -v
4.0.5
npm uninstall ionic -g
npm uninstall cordova -g
npm cache clean
npm install cordova -g
npm install ionic -g
@adirzoari

@richardshergold thank you it's worked for me!
I uninstalled cordova first then ionic and install all global as you explained..

@dtrujo
dtrujo commented Dec 24, 2016

Thanks work for me

@Anbuphonegap

While install ionic using below command:

npm install ionic -g
below error throws:

npm WARN In ionic@2.1.18 replacing bundled version of ionic-app-lib with ionic-a
pp-lib@2.1.9

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\io
nic\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@
1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32
"})
npm WARN In ionic@2.1.18 replacing bundled version of cross-spawn with cross-spa
wn@4.0.2
npm WARN In ionic@2.1.18 replacing bundled version of semver with semver@4.2.0
npm WARN In ionic@2.1.18 replacing bundled version of mime-types with mime-types
@2.0.14
npm WARN In ionic@2.1.18 replacing bundled version of form-data with form-data@0
.2.0
npm WARN In ionic@2.1.18 replacing bundled version of request with request@2.51.
0
npm WARN In ionic@2.1.18 replacing bundled version of ionic-app-lib with ionic-a
pp-lib@2.1.9

any body help to resolve this issue

Thanks
Anbu

@mehmetaltuntas
mehmetaltuntas commented Dec 30, 2016 edited

I have tried all the above help, no luck so far.

I am at my root directory and I ran the commands, but cannot get cordova, ionic installed properly.

I have got the following result when I run "npm info" :

npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "info"
npm ERR! node v7.3.0
npm ERR! npm v3.10.10

npm ERR! Invalid package.json
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/*******/npm-debug.log

Can anyone explain me what should be done in order to install cordova, ionic please?
Thanks

@josecarvajal8

Hey I've tried a lot of things but my terminal is still showing me "ionic: command not found"

can anyone help me?

when I tried to install ionic I got this

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 minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
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 node-uuid@1.4.7: use uuid module instead
npm WARN deprecated node-uuid@1.3.3: use uuid module instead
/Users/jose/.npm-packages/bin/ionic -> /Users/jose/.npm-packages/lib/node_modules/ionic/bin/ionic

fsevents@1.0.17 install /Users/jose/.npm-packages/lib/node_modules/ionic/node_modules/fsevents
node-pre-gyp install --fallback-to-build

[fsevents] Success: "/Users/jose/.npm-packages/lib/node_modules/ionic/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile

Thanks

@john5db
john5db commented Jan 7, 2017 edited

@josecarvajal8

what is version of node you have ?
update node to v 6.9.2
update npm to latest

after updating
You must uninstall ionic & cardova

try following commands

npm uninstall -g cordova
npm uninstall -g ionic

  • note even if you see "ionic: command not found" you must run ' npm uninstall -g ionic' it will remove ionic completely

sudo npm install -g cordova ionic

@josecarvajal8

@john5db

Man thanks for your time, I have node 6.9.4 and the last version of npm
and I have done those steps several time and it keeps showing "ionic: command not found"

thanks man

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment