我已經在一個項目上工作,在更新腳本後,我發現這個錯誤。 它似乎無法正確轉換HTML文件。 我卸載離子重新安裝了一切到最新版本,但仍然給出相同的錯誤。IONIC-模塊解析失敗,加載模板
模塊解析失敗:/Users/george/dev/flask/rdan/node_modules/@ionic/app-scripts/dist/webpack/loader.js!/Users/george/dev/flask/rdan/src /pages/home/home.ts意外的標記(20:0) 您可能需要一個合適的加載器來處理此文件類型。 | @Component(選擇器:'page-home',template:/ ion-inline-start:「/ Users/george/dev/flask/rdan/src/pages/home/home.html」 /'\ ñ\ n \ n
這是我的離子信息
全球包:
@ionic/cli-utils : 1.5.0
Cordova CLI : 7.0.1
Ionic CLI : 3.5.0
本地套餐:
@ionic/app-scripts : 2.0.2
@ionic/cli-plugin-cordova : 1.4.1
@ionic/cli-plugin-ionic-angular : 1.3.2
Cordova Platforms : android 6.2.3
Ionic Framework : ionic-angular 3.5.3
系統:
Node : v6.10.3
OS : macOS Sierra
Xcode : Xcode 8.3 Build version 8E162
ios-deploy : 1.9.1
ios-sim : 5.0.13
npm : 5.3.0
這是的package.json文件
{
"name": "rdan",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"@angular/common": "4.1.3",
"@angular/compiler": "4.1.3",
"@angular/compiler-cli": "4.1.3",
"@angular/core": "4.1.3",
"@angular/forms": "4.1.3",
"@angular/http": "4.1.3",
"@angular/platform-browser": "4.1.3",
"@angular/platform-browser-dynamic": "4.1.3",
"@ionic-native/core": "3.12.1",
"@ionic-native/native-audio": "^4.0.1",
"@ionic-native/splash-screen": "3.12.1",
"@ionic-native/status-bar": "3.12.1",
"@ionic/storage": "2.0.1",
"cordova-android": "^6.2.3",
"cordova-plugin-console": "^1.0.5",
"cordova-plugin-device": "^1.1.4",
"cordova-plugin-splashscreen": "^4.0.3",
"cordova-plugin-statusbar": "^2.2.2",
"cordova-plugin-whitelist": "^1.3.2",
"ionic-angular": "3.5.3",
"ionic-plugin-keyboard": "^2.2.1",
"ionicons": "3.0.0",
"promise-polyfill": "6.0.2",
"rxjs": "5.4.0",
"socket.io-client": "^2.0.3",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.12"
},
"devDependencies": {
"@ionic/app-scripts": "2.0.2",
"@ionic/cli-plugin-cordova": "^1.4.1",
"@ionic/cli-plugin-ionic-angular": "1.3.2",
"typescript": "2.3.4"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-console": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-whitelist": {},
"ionic-plugin-keyboard": {}
},
"platforms": [
"android"
]
}
}
我試過......
npm uninstall -g ionic
npm uninstall cordova -g
rm -rf node-modules
npm install
npm remove -g cordova
sudo npm install -g cordova
任何想法? 注意:對不起,我的英語