Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ionic cli: all commands giving error undefined:1 SyntaxError: Unexpected token

I have downloaded and installed nodejs (setup file node-v0.12.5-x64) in my Windows7 pc.
Also installed ionic via command: npm install -g ionic cordova

All ionic commands are giving same error i.e. undefined:1.
In command prompt it looks like below:

E:\programs>ionic -v  
undefined:1  
SyntaxError: Unexpected token

I am not able to resolve after many installation and un-installation.
Please help.

like image 584
anand Avatar asked Jun 30 '15 11:06

anand


1 Answers

The issue on another thread

My C:\Users\USER\ .ionic\ionic.config had been corrupted and deleting it solved the issue

if that's not the issue then navigate to where you have ionic installed, for me it's C:\Users\USER\AppData\Roaming\npm\node_modules\ionic\lib\ionic

then open a command prompt and run "npm install -g node-debug after installing run "node-debug app.js" from that folder and step through the program to identify the error

like image 109
Pragadees Avatar answered Oct 05 '22 10:10

Pragadees