Ionic Script error: Cannot find module 'acorn'


#1

I keep getting this error with various different Ionic script commands:
UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Cannot find module 'acorn'

I’ve tried updating to the latest version of ionic-app-scripts to no avail. I’m running an older version of Ionic because I’ve been unable to upgrade without a serious issue.

cli packages: (C:\Users\golear\Repos\MobileShoppingAssist\node_modules)

    @ionic/cli-utils  : 1.19.1
    ionic (Ionic CLI) : 3.19.1

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.9
    Cordova Platforms  : android 6.2.3
    Ionic Framework    : ionic-angular 3.9.0

System:

    Android SDK Tools : 26.1.1
    Node              : v6.10.3
    npm               : 5.8.0
    OS                : Windows 10

Environment Variables:

    ANDROID_HOME : C:\Users\golear\AppData\Local\Android\sdk

Misc:

    backend : pro

package.json looks like:

{
    ...
    "private": true,
    "scripts": {
        "ionic:build": "ionic-app-scripts build",
        "ionic:serve": "ionic-app-scripts serve"
    },
    "dependencies": {
        "@angular-redux/store": "^6.6.0",
        "@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",
        "@aria/webjs-localstorage": "^1.1.0",
        "@aria/webjs-sdk": "^1.6.1",
        "@ionic-native/app-version": "3.4.2",
        "@ionic-native/background-mode": "^3.12.1",
        "@ionic-native/core": "3.10.2",
        "@ionic-native/in-app-browser": "3.4.2",
        "@ionic-native/phonegap-local-notification": "^4.1.0",
        "@ionic-native/social-sharing": "3.4.2",
        "@ionic-native/splash-screen": "3.10.2",
        "@ionic-native/status-bar": "3.10.2",
        "@ionic/storage": "^2.0.1",
        "android-versions": "^1.2.1",
        "cordova-android": "6.2.3",
        "cordova-android-support-gradle-release": "0.0.2",
        "cordova-plugin-app-version": "^0.1.9",
        "cordova-plugin-console": "^1.0.7",
        "cordova-plugin-device": "^1.1.6",
        "cordova-plugin-inappbrowser": "^1.5.0",
        "cordova-plugin-psa-scraper": "file:scraper_plugin",
        "cordova-plugin-splashscreen": "^4.0.3",
        "cordova-plugin-statusbar": "^2.2.3",
        "cordova-plugin-whitelist": "^1.3.2",
        "cordova-plugin-wkwebview-engine": "https://github.com/driftyco/cordova-plugin-wkwebview-engine.git",
        "cordova-plugin-x-socialsharing": "^5.1.8",
        "cordova-psa-scraper": "file:scraper_plugin",
        "cordova-sqlite-storage": "^2.0.4",
        "es6-promise-plugin": "^4.1.0",
        "ionic": "^3.7.0",
        "ionic-angular": "^3.6.0",
        "ionic-plugin-keyboard": "^2.2.1",
        "ionicons": "3.0.0",
        "lodash": "^4.17.4",
        "phonegap-plugin-local-notification": "^1.0.1",
        "redux": "^3.7.2",
        "redux-persist": "^5.5.0",
        "reflect-metadata": "^0.1.10",
        "rxjs": "5.4.0",
        "sw-toolbox": "3.6.0",
        "urijs": "^1.18.12",
        "zone.js": "0.8.12"
    },
    "devDependencies": {
        "@ionic/app-scripts": "2.1.4",
        "@types/lodash": "^4.14.52",
        "ionic": "3.19.0",
        "js-cookie": "^2.1.4",
        "ncp": "^2.0.0",
        "q": "^1.5.0",
        "ts-loader": "^2.3.7",
        "typescript": "2.3.4",
        "webpack": "^3.5.6"
    },
    "config": {
        "ionic_bundler": "rollup"
    },
    "cordovaPlugins": [
        "cordova-plugin-device",
        "cordova-plugin-console",
        "cordova-plugin-whitelist",
        "cordova-plugin-splashscreen",
        "cordova-plugin-statusbar",
        "ionic-plugin-keyboard"
    ],
    "cordovaPlatforms": [],
    "cordova": {
        "plugins": {
            "cordova-plugin-app-version": {},
            "cordova-plugin-console": {},
            "cordova-plugin-device": {},
            "cordova-plugin-inappbrowser": {},
            "cordova-plugin-splashscreen": {},
            "cordova-plugin-statusbar": {},
            "cordova-plugin-whitelist": {},
            "cordova-plugin-x-socialsharing": {},
            "cordova-sqlite-storage": {},
            "ionic-plugin-keyboard": {},
            "cordova-android-support-gradle-release": {},
            "phonegap-plugin-local-notification": {},
            "cordova-plugin-psa-scraper": {}
        },
        "platforms": [
            "android"
        ]
    }
}