ionic第二次运行报错
问题描述
最近接手了一个ionic的项目,但是不知道是ionic几的,我ionic sserve运行提示我npm install @ionic/v1-toolkit
第一次可以运行成功,但是关掉服务,再一次运行就会报错
"dependencies": {
"call-number": "git+https://github.com/Rohfosho/CordovaCallNumberPlugin.git",
"cordova-hot-code-push-plugin": "^1.5.3",
"cordova-ios": "^4.1.1",
"cordova-plugin-android-permissions": "~0.10.0",
"cordova-plugin-console": "~1.0.3",
"cordova-plugin-device": "~1.1.2",
"cordova-plugin-splashscreen": "~3.2.2",
"cordova-plugin-statusbar": "~2.1.3",
"cordova-plugin-whitelist": "~1.2.2",
"gulp": "^3.5.6",
"gulp-angular-templatecache": "^2.0.0",
"gulp-concat": "^2.2.0",
"gulp-htmlmin": "^2.0.0",
"gulp-if": "^2.0.1",
"gulp-live-server": "0.0.30",
"gulp-minify-css": "^0.3.0",
"gulp-ng-annotate": "^2.0.0",
"gulp-obfuscate": "^0.2.9",
"gulp-open": "^2.0.0",
"gulp-rename": "^1.2.0",
"gulp-sass": "^3.2.0",
"gulp-uglify": "^2.0.0",
"gulp-uglifycss": "^1.0.6",
"gulp-useref": "^3.1.2",
"gulp-webserver": "^0.9.1",
"ionic-plugin-keyboard": "~2.2.1",
"os": "^0.1.1"
},
"devDependencies": {
"@ionic/v1-toolkit": "1.0.14",
"bower": "^1.3.3",
"gulp-util": "^2.2.14",
"read-package-json": "^2.0.4",
"shelljs": "^0.3.0",
"xml2js": "^0.4.17"
},
"cordovaPlugins": [
"cordova-plugin-device",
"cordova-plugin-console",
"cordova-plugin-whitelist",
"cordova-plugin-splashscreen",
"cordova-plugin-statusbar",
"ionic-plugin-keyboard",
"cordova-hot-code-push-local-dev-addon"
],
"cordovaPlatforms": [
"android",
"ios"
],
"cordova": {
"plugins": {
"cordova-plugin-device": {},
"cordova-plugin-console": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-statusbar": {},
"ionic-plugin-keyboard": {},
"cordova-plugin-android-permissions": {},
"cordova-hot-code-push-plugin": {},
"call-number": {}
},
"platforms": [
"ios"
]
}
上面是packgae.josn文件
下面是项目目录
,
不知道有什么解决办法没
问题出现的环境背景及自己尝试过哪些方法
相关代码
// 请把代码文本粘贴到下方(请勿用图片代替代码)
你期待的结果是什么?实际看到的错误信息又是什么?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看描述应该是 ionic1.x 了,那会应该用的是Angular1.x。
然后命令行报错大概的意思这个项目不是一个Angular项目,所以angular-cli或者ionic-cli无法编译运行,然后报错了。
由于Angular1.x以后的版本更新比较大,我猜可能原因是你的本地的angular-cli版本或者ionic-cli版本可是比较新,兼容不了1.x版本。
建议把angular-cli弄成1.x版本试试。或者跟着ionic 1.x的文档重新构建一次试试。
ionic v1 版本