Ionic Pro: Build Fail


#1

Hi All,

I am successfully linked my app to Ionic Pro (paid version). I’ve gone to execute:

git push ionic master

However I get a build fail, here what it says:

Cloning into '/home/gitlab-runner/builds/c9648220/0/project-1'...
Checking out 7f9599f0 as master...
Skipping Git submodules setup
$ fetch-updates
Checking for build process updates...
$ build-app
Fetching build dependencies...
Running: npm install
npm WARN deprecated cordova-plugin-console@1.0.5: This plugin has been deprecated since it is now included in the latest versions of cordova-ios
npm WARN deprecated node-uuid@1.4.7: Use uuid module instead
npm WARN deprecated object-keys@0.2.0: Please update to the latest object-keys

> node-sass@4.5.3 install /usr/src/app/node_modules/@ionic/app-scripts/node_modules/node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.5.3/linux-x64-57_binding.node
Download complete
Binary saved to /usr/src/app/node_modules/@ionic/app-scripts/node_modules/node-sass/vendor/linux-x64-57/binding.node
Caching binary to /home/gitlab-runner/.npm/node-sass/4.5.3/linux-x64-57_binding.node

> uglifyjs-webpack-plugin@0.4.6 postinstall /usr/src/app/node_modules/@ionic/app-scripts/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js


> node-sass@4.5.3 postinstall /usr/src/app/node_modules/@ionic/app-scripts/node_modules/node-sass
> node scripts/build.js

Binary found at /usr/src/app/node_modules/@ionic/app-scripts/node_modules/node-sass/vendor/linux-x64-57/binding.node
Testing binary
Binary is fine
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules/@ionic/app-scripts/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 818 packages in 29.331s
npm install succeeded
Running: npm run build
npm info it worked if it ends with ok
npm info using npm@5.3.0
npm info using node@v8.2.1
npm info lifecycle ourmgmt2-mobile@0.0.1~prebuild: ourmgmt2-mobile@0.0.1
npm info lifecycle ourmgmt2-mobile@0.0.1~build: ourmgmt2-mobile@0.0.1

> ourmgmt2-mobile@0.0.1 build /usr/src/app
> ionic-app-scripts build

module.js:487
    throw err;
    ^

Error: Cannot find module '@angular/tsc-wrapped/src/tsc'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object. (/usr/src/app/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:6:13)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
npm info lifecycle ourmgmt2-mobile@0.0.1~build: Failed to exec build script
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ourmgmt2-mobile@0.0.1 build: `ionic-app-scripts build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ourmgmt2-mobile@0.0.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/gitlab-runner/.npm/_logs/2017-10-21T02_03_32_953Z-debug.log
npm run build failed
Make sure your project has a build script in the package.json
Running after script...
$ clean-up
Cleaning up files...
Successful clean up
ERROR: Job failed: exit status 1

Here is my Ionic Info:

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

    @ionic/cli-utils  : 1.13.1
    ionic (Ionic CLI) : 3.13.2

global packages:

    cordova (Cordova CLI) : 7.1.0 

local packages:

    @ionic/app-scripts : 3.0.0
    Cordova Platforms  : android 6.1.2 ios 4.4.0
    Ionic Framework    : ionic-angular 3.7.1

System:

    ios-deploy : 1.9.1 
    Node       : v8.6.0
    npm        : 5.3.0 
    OS         : macOS Sierra
    Xcode      : Xcode 9.0 Build version 9A235 

Misc:

    backend : pro

I’ve been spending hours on how to resolve this. Appreciate if any can help me on this?? Thanks in advance


#2

@karvanj if you have control over the server by root means, it appears you miss a few extensions, make sure to get them by apt-get or else.


#3

Ionic Pro is a hosted and closed source service, so there is not much we, the community, can help you with, sorry. Check these:

You can - and should - contact support at http://ionicframework.com/support#support


#4

Can and did you build your app locally?
Can you create a new project with ionic start and build that one with Ionic Pro?


#5

Ionic Pro is a hosted and closed source service, so there is not much we, the community, can help you with, sorry. Check these:

If this is the case why is in Ionic Pro when I go to the help section the first thing it says:
The Ionic community is your first stop for questions and advice about the Framework. Welcome to the community!

I mean seriously if this not true, then it should be removed!

I managed to get it built and uploaded by following the solution Ionic Pro: Build Failed "missing script: build". I had to add: git add www/* -f and remove www from my .gitignore.

However I still get an error in my the build script Cannot find module ‘@angular/tsc-wrapped/src/tsc’. But at least it is stills builds. I have raised a ticket anyway.

Here is the log now, if anyone has an idea what is going on:

Running with gitlab-ci-multi-runner 9.1.0 (0118d89)
  on Prod Snapshot Builds 1 (c9648220)
Using Shell executor...
Running on ip-10-2-91-215...
Cloning repository...
Cloning into '/home/gitlab-runner/builds/c9648220/0/project-1'...
Checking out 4368aefa as master...
Skipping Git submodules setup
$ fetch-updates
Checking for build process updates...
$ build-app
Fetching build dependencies...
Detected www/ directory commited to version control. Assuming Ionic 1 app.
Running: npm install
npm WARN deprecated cordova-plugin-console@1.0.5: This plugin has been deprecated since it is now included in the latest versions of cordova-ios
npm WARN deprecated node-uuid@1.4.7: Use uuid module instead
npm WARN deprecated object-keys@0.2.0: Please update to the latest object-keys

> node-sass@4.5.3 install /usr/src/app/node_modules/@ionic/app-scripts/node_modules/node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.5.3/linux-x64-57_binding.node
Download complete
Binary saved to /usr/src/app/node_modules/@ionic/app-scripts/node_modules/node-sass/vendor/linux-x64-57/binding.node
Caching binary to /home/gitlab-runner/.npm/node-sass/4.5.3/linux-x64-57_binding.node

> uglifyjs-webpack-plugin@0.4.6 postinstall /usr/src/app/node_modules/@ionic/app-scripts/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js


> node-sass@4.5.3 postinstall /usr/src/app/node_modules/@ionic/app-scripts/node_modules/node-sass
> node scripts/build.js

Binary found at /usr/src/app/node_modules/@ionic/app-scripts/node_modules/node-sass/vendor/linux-x64-57/binding.node
Testing binary
Binary is fine
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules/@ionic/app-scripts/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 818 packages in 28.221s
npm install succeeded
Running: npm run build
npm info it worked if it ends with ok
npm info using npm@5.3.0
npm info using node@v8.2.1
npm info lifecycle ourmgmt2-mobile@0.0.1~prebuild: ourmgmt2-mobile@0.0.1
npm info lifecycle ourmgmt2-mobile@0.0.1~build: ourmgmt2-mobile@0.0.1

> ourmgmt2-mobile@0.0.1 build /usr/src/app
> ionic-app-scripts build

module.js:487
    throw err;
    ^

Error: Cannot find module '@angular/tsc-wrapped/src/tsc'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object. (/usr/src/app/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:6:13)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
npm info lifecycle ourmgmt2-mobile@0.0.1~build: Failed to exec build script
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ourmgmt2-mobile@0.0.1 build: `ionic-app-scripts build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ourmgmt2-mobile@0.0.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/gitlab-runner/.npm/_logs/2017-10-21T11_30_19_278Z-debug.log
npm run build failed
Ionic 1 app detected so assuming everthing is ok.
Uploading build...
Uploaded build successfully.
Running after script...
$ clean-up
Cleaning up files...
Successful clean up
Job succeeded

#6

Again, this is something you should tell them via the support channels. Ionic team will not see this here and we can’t do anything about it. I would also prefer if I wouldn’t have to post this same message under all the Ionic Pro posts (that don’t even have their own category), but this is just the reality.