Ionic Pro Build - Cannot find module ionic-app-scripts


#1

I am getting the following error when attempting to do a build with Ionic Pro. I have a paid account.

> node ionic-app-scripts build

module.js:549
    throw err;
    ^

Error: Cannot find module '/usr/src/app/ionic-app-scripts'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:188:16)
    at bootstrap_node.js:609:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1

#2

What is your ionic info output in your local project directory?


#3

Ionic:

ionic (Ionic CLI) : 4.0.6 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.1.6

Cordova:

cordova (Cordova CLI) : 7.1.0
Cordova Platforms : android 6.3.0, ios 4.3.1

System:

ios-deploy : 1.9.2
ios-sim : 5.0.13
NodeJS : v8.9.4 (/usr/local/bin/node)
npm : 5.7.1
OS : macOS High Sierra
Xcode : Xcode 9.4.1 Build version 9F2000


#4

This is outdated, there should be a newer version available.

Your Cordova tooling seems to be out of date, which might be causing all kinds of problems.
You can read about how to figure out the current Cordova versions and how to update CLI, platforms and plugins here: https://ionic.zone/cordova/update

Does ionic serve work?
What about ionic build?


#5

I’m using Ionic Pro dashboard.

I can run Ionic serve fine locally. I tried using a more recent copy of the app-scripts. That did not help at all.


#6

I updated app scripts and cordova. The issue remains the same.

Ionic:

ionic (Ionic CLI) : 4.0.6 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.1.11

Cordova:

cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 7.1.1, ios 4.5.5

System:

ios-deploy : 1.9.2
ios-sim : 5.0.13
NodeJS : v8.9.4 (/usr/local/bin/node)
npm : 6.3.0
OS : macOS High Sierra
Xcode : Xcode 9.4.1 Build version 9F2000


#7

I repeat:

Create a new project with ionic start and connect to Ionic Pro. Does that one work?


#8

Ionic build works fine. Everything works fine locally.

My only issue is packaging on pro.

I can connect with other projects.


#9

Can you also package those projects?


#10

Yes I can also package those projects


#11

Any other suggestions? This is still not working and I am still paying for the service.


#12

Then probably better ask the people you are paying for (Ionic), and not other users in a community forum.