离子框架命令行错误未定义:1 SyntaxError:意外令牌 [英] ionic framework command line error undefined:1 SyntaxError: Unexpected token
问题描述
我运行的是windows 8.1 64位,节点版本为0.12.7。
I am running windows 8.1 64 bit with node version 0.12.7 .
我安装了cordova和ion全局都工作正常。但现在每个离子命令返回错误。
I have install both cordova and ionic globally all was working fine. But now every ionic command returns error .
示例ionic-version
p>
example ionic --version
未定义:1
undefined:1
语法错误:意外的令牌
我重新安装了节点和离子,但问题仍然存在。
i have reinstalled node and ionic but problem still persists.
但是在npm命令返回后
but following npm command returns
>npm ls -g --depth=0
├── bower@1.3.12
├── cordova@5.1.1
├── electron-prebuilt@0.29.2
├── forever@0.14.1
├── ionic@1.6.1
├── nodemon@1.3.7
├── pm2@0.12.4
├── stylus@0.50.0
├── vs-mda@0.1.19
└── vs-mda-targets@0.1.12
推荐答案
我已经解决了在Windows 7中的问题。
I have solved the issues in windows 7.
我只是去下面的路径
\Users.ionic\ionic.config
C:\Users.ionic\ionic.config
删除ionic.config文件并转到cmd提示符。
运行以下CLI。
Delete the ionic.config file and go to the cmd prompt. Run the Below CLI.
ionic服务
问题已解决。
如果您再次查看路径
C:\Users.ionic
Issue is solved. If you go to see the path again C:\Users.ionic
ionic.config文件被重新生成。
原因是ionic.config已损坏。
ionic.config file is regenerated. The Reason is ionic.config got corrupted.
这篇关于离子框架命令行错误未定义:1 SyntaxError:意外令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!