ionic-team / ionic-cli

The Ionic command-line interface
MIT License
2k stars 651 forks source link

Ionic Beta does not install with missing execSync. #895

Closed jgw96 closed 8 years ago

jgw96 commented 8 years ago

From @trb143 on April 3, 2016 14:58

Note: for support questions, please use one of these channels:

https://forum.ionicframework.com/ http://ionicworldwide.herokuapp.com/

Short description of the problem:

I managed to install ionic beta 22 last week but needed to reinstall it this week. Now all I get is

OpenLP2 sudo npm i -g ionic@beta

<<<<<>>>>>>

npm http 304 https://registry.npmjs.org/is-arrayish /bin/ionic -> /lib/node_modules/ionic/bin/ionic

ionic@2.0.0-beta.23 postinstall /lib/node_modules/ionic node lib/tasks/postinstall

/usr/lib/node_modules/ionic/lib/tasks/postinstall.js:9 execSync(cmd, {stdio: [0,1,2]}); ^ TypeError: undefined is not a function at Object. (/usr/lib/node_modules/ionic/lib/tasks/postinstall.js:9:1) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:935:3 npm ERR! weird error 8 npm ERR! not ok code 0 ➜

What behavior are you expecting?

A working install which I can use to start the server etc. I have uninstalled NPM / node and deleted all the libraries and done a clean install but no luck.

Steps to reproduce:

insert any relevant code between the above and below backticks

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

Which Ionic Version? 2.x

Run ionic info from terminal/cmd prompt: (paste output below) Fails as ionic is not installed

Copied from original issue: driftyco/ionic#6032

jgw96 commented 8 years ago

Hello! Thanks for opening an issue with us! Since this issue is related to the ionic cli and not the framework I will be moving this issue to the cli repo. Thanks again!

tlancina commented 8 years ago

The postinstall script was removed in beta.24, could you try installing the latest ionic@beta?

If you need to stay on that version, you can make this go away by upgrading your version of node past 0.10.

trb143 commented 8 years ago

Things do install now and I can start the server but I get

Hash: 093fdc6c27e74f0414dc Version: webpack 1.12.14 Time: 4326ms Asset Size Chunks Chunk Names app.bundle.js 2.79 MB 0 [emitted] main

ERROR in multi main Module not found: Error: Cannot resolve module 'zone.js/dist/zone-microtask' in /home/tim/Projects/OpenLP/openlp_ionic/OpenLP2 @ multi main [18:18:29] Finished 'watch' after 4.41 s [18:18:29] Starting 'serve:before'...

node is 5.10 and zone.js is at 0.6.8 which from a google should fix the issue.

On 4 April 2016 at 18:30, Tim Lancina notifications@github.com wrote:

The postinstall script was removed in beta.24, could you try installing the latest ionic@beta?

If you need to stay on that version, you can make this go away by upgrading your version of node past 0.10.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/driftyco/ionic-cli/issues/895#issuecomment-205406659

Tim and Alison Bentley Home@TRARBentley.net

tlancina commented 8 years ago

Great, glad it installs now! I'm going to close this as the original issue is solved. I believe the zone problem is related to upgrading zone versions, Ionic 2 is still using 0.5.15, but is scheduled to update for the beta.4 release which should be coming out soon: https://github.com/driftyco/ionic/issues/6026.