msg.trim is not a function

青春壹個敷衍的年華 提交于 2019-12-12 23:05:54

问题


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"
        ]
    }
}

来源:https://stackoverflow.com/questions/47133396/msg-trim-is-not-a-function

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!