简体   繁体   中英

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 ie 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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM