msg.trim is not a function.
I tried to generate a .apk file for android after that I got this error. I uninstalled both npm and ionic and reinstalled it but I am getting the same error please anyone can help me out to solve this problem.
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>
"ionic info"
cli packages: (C:\Users\DELL INDIA\AppData\Roaming\npm\node_modules)
@ionic/cli-utils : 1.16.0
ionic (Ionic CLI) : 3.16.0
System:
Node : v8.9.0
npm : 5.5.1
OS : Windows 10
Misc:
backend : legacy
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. (C:\Users\DELL INDIA\AppData\Roaming\npm\node_modules\ionic\dist\index.js:269:22) at Generator.throw () at rejected (C:\Users\DELL INDIA\AppData\Roaming\npm\node_modules\ionic\node_modules\tslib\tslib.js:101:69) at
packages.json file:
{
"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"
]
}
}