Build fails after deleting /plugins and /node_modules


#1

Hello all,

I just had a small problem where the tab bar would be cut off by the iPhone X’s home button bar. I followed the issue https://github.com/ionic-team/ionic/issues/13010 and installed a newer version of ionic-angular.
After that my build failed and I tried going back to my original setup. No luck. I got errors related to version missmateches of my packages so I deleted the /node_modules and the /plugings folder, removed the platforms and readded them. Building still does not work although all my configuration files and my entire setup is back to what it was before.

I hope somebody can help me.

Thank you and Merry Christmas!

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0

global packages:

    cordova (Cordova CLI) : 7.1.0 

local packages:

    @ionic/app-scripts : 1.3.8
    Cordova Platforms  : ios 4.5.4
    Ionic Framework    : ionic-angular 3.4.2

System:

    Android SDK Tools : 26.0.2
    ios-deploy        : 1.9.2 
    Node              : v7.7.3
    npm               : 4.4.4 
    OS                : macOS High Sierra
    Xcode             : Xcode 9.2 Build version 9C40b 

Environment Variables:

    ANDROID_HOME : /Users/Daniel/Library/Android/sdk/

Misc:

    backend : pro
cordova-plugin-actionsheet 2.3.3 "ActionSheet"
cordova-plugin-admobpro 2.29.29 "AdMob Plugin Pro"
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-console 1.1.0 "Console"
cordova-plugin-device 1.1.7 "Device"
cordova-plugin-dialogs 2.0.0 "Notification"
cordova-plugin-email-composer 0.8.11 "EmailComposer"
cordova-plugin-extension 1.5.3 "Cordova Plugin Extension"
cordova-plugin-firebase 0.1.25 "Google Firebase Plugin"
cordova-plugin-globalization 1.0.9 "Globalization"
cordova-plugin-inappbrowser 1.7.2 "InAppBrowser"
cordova-plugin-ionic-webview 1.1.16 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 4.1.0 "Splashscreen"
cordova-plugin-statusbar 2.4.0 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-sqlite-storage 2.1.4 "Cordova sqlite storage plugin"
ionic-plugin-keyboard 2.2.1 "Keyboard"
me.tonny.cordova.plugins.multidex 0.1.0 "Cordova Multi Dex"
onesignal-cordova-plugin 2.2.5 "OneSignal Push Notifications"
uk.co.workingedge.phonegap.plugin.launchnavigator 4.1.2 "Launch Navigator"
"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/app-version": "4.4.0",
    "@ionic-native/core": "4.2.0",
    "@ionic-native/email-composer": "4.3.0",
    "@ionic-native/firebase": "4.3.0",
    "@ionic-native/firebase-analytics": "4.3.0",
    "@ionic-native/globalization": "4.4.2",
    "@ionic-native/in-app-browser": "4.2.1",
    "@ionic-native/launch-navigator": "4.2.1",
    "@ionic-native/onesignal": "4.2.1",
    "@ionic-native/splash-screen": "3.12.1",
    "@ionic-native/status-bar": "3.12.1",
    "@ionic/storage": "2.0.1",
    "@ngx-translate/core": "9.0.1",
    "@ngx-translate/http-loader": "2.0.0",
    "android-versions": "1.2.1",
    "cordova-multidex": "git+https://github.com/jwall149/cordova-multidex.git",
    "cordova-plugin-actionsheet": "2.3.3",
    "cordova-plugin-admobpro": "2.29.29",
    "cordova-plugin-app-version": "0.1.9",
    "cordova-plugin-console": "1.0.5",
    "cordova-plugin-device": "1.1.4",
    "cordova-plugin-dialogs": "1.3.3",
    "cordova-plugin-email-composer": "0.8.7",
    "cordova-plugin-extension": "1.5.3",
    "cordova-plugin-firebase": "0.1.25",
    "cordova-plugin-globalization": "1.0.9",
    "cordova-plugin-inappbrowser": "1.7.1",
    "cordova-plugin-ionic-webview": "1.1.16",
    "cordova-plugin-splashscreen": "4.0.3",
    "cordova-plugin-statusbar": "2.2.2",
    "cordova-plugin-whitelist": "1.3.1",
    "cordova-sqlite-storage": "2.0.4",
    "gl-ionic2-env-configuration": "0.0.18",
    "ionic-angular": "3.4.2",
    "ionic-plugin-keyboard": "2.2.1",
    "ionicons": "3.0.0",
    "me.tonny.cordova.plugins.multidex": "https://github.com/jwall149/cordova-multidex",
    "moment": "2.19.3",
    "ng-lazyload-image": "3.3.3",
    "ng2-translate": "5.0.0",
    "ngx-pipes": "1.6.1",
    "onesignal-cordova-plugin": "2.2.0",
    "rxjs": "5.4.0",
    "sw-toolbox": "3.6.0",
    "uk.co.workingedge.phonegap.plugin.launchnavigator": "4.0.4",
    "zone.js": "0.8.12"
  },
  "devDependencies": {
    "@ionic/app-scripts": "1.3.8",
    "typescript": "2.3.4"
  }

#2

Your Node has security breaches, update that first, to the current LTS. Your app-scripts is super old. Update that next. Then see where you’re at.


#3

So I updated both. Now I’m at

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0

global packages:

    cordova (Cordova CLI) : 7.1.0 

local packages:

    @ionic/app-scripts : 3.1.6
    Cordova Platforms  : ios 4.5.4
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.0.2
    ios-deploy        : 1.9.2 
    Node              : v8.9.3
    npm               : 5.5.1 
    OS                : macOS High Sierra
    Xcode             : Xcode 9.2 Build version 9C40b 

Environment Variables:

    ANDROID_HOME : /Users/Daniel/Library/Android/sdk/

Misc:

    backend : pro

When trying to serve (or build) I get the following error now:

Error: Cannot find module '/Users/Daniel/Code/baseball/baseball_app/node_modules/@ionic/app-scripts'
    at Function.Module._resolveFilename (module.js:536:15)
    at Function.Module._load (module.js:466:25)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/ionic/node_modules/@ionic/cli-utils/lib/ionic-angular/app-scripts.js:9:16)
    at Generator.next (<anonymous>)
    at /usr/local/lib/node_modules/ionic/node_modules/tslib/tslib.js:103:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/usr/local/lib/node_modules/ionic/node_modules/tslib/tslib.js:99:16)
    at Object.importAppScripts (/usr/local/lib/node_modules/ionic/node_modules/@ionic/cli-utils/lib/ionic-angular/app-scripts.js:7:20)

This seems weird to me because this is a module that is specified in package.json and should therefore have been installed when running npm install. After installing this package manually it just warns me that the next package is not installed. This happens for alle the packages that are in package.json.