msg.trim不是一个函数。
在我收到此错误后,我尝试为Android生成.apk文件。我卸载了npm和ionic并重新安装它但是我得到了同样的错误,请任何人都可以帮我解决这个问题。
C:\>ionic -v
3.16.0
TypeError: msg.trim is not a function
at Logger.log (C:\Users\DELL INDIA\AppData\Roaming\npm\node_modules\ionic\node_modules\@ionic\cli-utils\lib\utils\logger.js:78:21)
at Logger.error (C:\Users\DELL INDIA\AppData\Roaming\npm\node_modules\ionic\node_modules\@ionic\cli-utils\lib\utils\logger.js:35:14)
at Object.<anonymous> (C:\Users\DELL INDIA\AppData\Roaming\npm\node_modules\ionic\dist\index.js:269:22)
at Generator.throw (<anonymous>)
at rejected (C:\Users\DELL INDIA\AppData\Roaming\npm\node_modules\ionic\node_modules\tslib\tslib.js:101:69)
at <anonymous>
&#34;离子信息&#34;
cli包:(C:\ Users \ DELL INDIA \ AppData \ Roaming \ npm \ node_modules)
@ionic/cli-utils : 1.16.0
ionic (Ionic CLI) : 3.16.0
系统:
Node : v8.9.0
npm : 5.5.1
OS : Windows 10
其他:
backend : legacy
TypeError:msg.trim不是函数 在Logger.log(C:\ Users \ DELL INDIA \ AppData \ Roaming \ npm \ node_modules \ ionic \ node_modules \ @ionic \ cli-utils \ lib \ utils \ logger.js:78:21) 在Logger.error(C:\ Users \ DELL INDIA \ AppData \ Roaming \ npm \ node_modules \ ionic \ node_modules \ @ionic \ cli-utils \ lib \ utils \ logger.js:35:14) 在对象。 (C:\ Users \ DELL INDIA \ AppData \ Roaming \ npm \ node_modules \ ionic \ dist \ index.js:269:22) 在Generator.throw() 被拒绝(C:\ Users \ DELL INDIA \ AppData \ Roaming \ npm \ node_modules \ ionic \ node_modules \ tslib \ tslib.js:101:69) 在
packages.json文件:
{
"name": "dreamhouse",
"version": "0.0.0",
"author": "Christophe Coenraets",
"homepage": "http://coenraets.org/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"@angular/common": "4.0.0",
"@angular/compiler": "4.0.0",
"@angular/compiler-cli": "4.0.0",
"@angular/core": "4.0.0",
"@angular/forms": "4.0.0",
"@angular/http": "4.0.0",
"@angular/platform-browser": "4.0.0",
"@angular/platform-browser-dynamic": "4.0.0",
"@ionic-native/core": "3.4.2",
"@ionic-native/splash-screen": "3.4.2",
"@ionic-native/status-bar": "3.4.2",
"@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.1",
"cordova-plugin-whitelist": "^1.3.1",
"ionic-angular": "3.0.1",
"ionic-plugin-keyboard": "^2.2.1",
"ionicons": "3.0.0",
"leaflet": "^1.0.3",
"rxjs": "5.1.1",
"sw-toolbox": "3.4.0",
"zone.js": "^0.8.4"
},
"devDependencies": {
"@ionic/app-scripts": "1.3.0",
"typescript": "~2.2.1"
},
"cordovaPlugins": [
"cordova-plugin-whitelist",
"cordova-plugin-statusbar",
"cordova-plugin-console",
"cordova-plugin-device",
"cordova-plugin-splashscreen",
"ionic-plugin-keyboard"
],
"cordovaPlatforms": [
"ios",
{
"platform": "ios",
"version": "",
"locator": "ios"
}
],
"description": "dreamhouse sample app",
"cordova": {
"plugins": {
"cordova-plugin-console": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-whitelist": {},
"ionic-plugin-keyboard": {}
},
"platforms": [
"android"
]
}
}