Ionic2 Pro build failed

Hello,

After build succeed locally I pushed my ionic2 application to ionic2 pro using git push ionic master.

I got a build failed inside the ionic2 pro dashboard.
And this is my error:

Preformatted text Running with gitlab-ci-multi-runner 9.1.0 (0118d89)
on ip-10-2-8-250 (c9648220)
Using Shell executor…
Running on ip-10-2-8-250…
Cloning repository…
Cloning into ‘/home/gitlab-runner/builds/c9648220/1/project-1’…
Checking out 7747d33d as master…
Skipping Git submodules setup
$ run "fetch-updates"
Running Stage fetch-updates for Job: 5349228
Checking for build process updates…
$ run "build-app"
Running Stage build-app for Job: 5349228
Parsing ionic.config.json for project settings
Project Settings:
Name: rnb-receiver
App ID: 61433aa0
Type: ionic-angular
Build script detected in package.json…
$ npm install --quiet --no-optional

node-sass@4.7.2 install /usr/src/app/node_modules/node-sass
node scripts/install.js

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

uglifyjs-webpack-plugin@https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz postinstall /usr/src/app/node_modules/uglifyjs-webpack-plugin
node lib/post_install.js

node-sass@4.7.2 postinstall /usr/src/app/node_modules/node-sass
node scripts/build.js

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

added 1238 packages in 58.251s
$ npm install --quiet --no-optional success
$ 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 rnb-receiver@0.0.1~prebuild: rnb-receiver@0.0.1
npm info lifecycle rnb-receiver@0.0.1~build: rnb-receiver@0.0.1

rnb-receiver@0.0.1 build /usr/src/app
ionic-app-scripts build

[13:00:10] ionic-app-scripts 3.1.8
[13:00:10] build dev started …
[13:00:10] clean started …
[13:00:10] clean finished in 2 ms
[13:00:10] copy started …
[13:00:10] deeplinks started …
[13:00:10] deeplinks finished in 295 ms
[13:00:10] transpile started …
[13:00:18] transpile finished in 7.65 s
[13:00:18] preprocess started …
[13:00:18] preprocess finished in less than 1 ms
[13:00:18] webpack started …
[13:00:18] copy finished in 8.30 s
[13:00:50] ionic-app-script task: “build”
[13:00:50] Error: ./node_modules/@ionic/cloud-angular/dist/esm/index.js Module not found: Error: Can’t resolve
@ionic/cloud’ in ‘/usr/src/app/node_modules/@ionic/cloud-angular/dist/esm’ resolve ‘@ionic/cloud’ in
’/usr/src/app/node_modules/@ionic/cloud-angular/dist/esm’ Parsed request is a module using description file:
/usr/src/app/node_modules/@ionic/cloud-angular/package.json (relative path: ./dist/esm) Field 'browser’
doesn’t contain a valid alias configuration after using description file:
/usr/src/app/node_modules/@ionic/cloud-angular/package.json (relative path: ./dist/esm) resolve as module
looking for modules in /usr/src/app/node_modules using description file: /usr/src/app/package.json (relative
path: ./node_modules) Field ‘browser’ doesn’t contain a valid alias configuration after using description
file: /usr/src/app/package.json (relative path: ./node_modules) using description file:
/usr/src/app/package.json (relative path: ./node_modules/@ionic/cloud) no extension Field ‘browser’ doesn’t
contain a valid alias configuration /usr/src/app/node_modules/@ionic/cloud doesn’t exist .ts Field 'browser’
doesn’t contain a valid alias configuration /usr/src/app/node_modules/@ionic/cloud.ts doesn’t exist .js
Field ‘browser’ doesn’t contain a valid alias configuration /usr/src/app/node_modules/@ionic/cloud.js
doesn’t exist .json Field ‘browser’ doesn’t contain a valid alias configuration
/usr/src/app/node_modules/@ionic/cloud.json doesn’t exist as directory
/usr/src/app/node_modules/@ionic/cloud doesn’t exist [/usr/src/app/node_modules/@ionic/cloud]
[/usr/src/app/node_modules/@ionic/cloud.ts] [/usr/src/app/node_modules/@ionic/cloud.js]
[/usr/src/app/node_modules/@ionic/cloud.json] [/usr/src/app/node_modules/@ionic/cloud] @
./node_modules/@ionic/cloud-angular/dist/esm/index.js 17:0-29 20:0-266 @ ./src/app/app.module.ts @
./src/app/main.ts
Error: ./node_modules/@ionic/cloud-angular/dist/esm/index.js
Module not found: Error: Can’t resolve ‘@ionic/cloud’ in '/usr/src/app/node_modules/@ionic/cloud-angular/dist/esm’
resolve ‘@ionic/cloud’ in '/usr/src/app/node_modules/@ionic/cloud-angular/dist/esm’
Parsed request is a module
using description file: /usr/src/app/node_modules/@ionic/cloud-angular/package.json (relative path: ./dist/esm)
Field ‘browser’ doesn’t contain a valid alias configuration
after using description file: /usr/src/app/node_modules/@ionic/cloud-angular/package.json (relative path: ./dist/esm)
resolve as module
looking for modules in /usr/src/app/node_modules
using description file: /usr/src/app/package.json (relative path: ./node_modules)
Field ‘browser’ doesn’t contain a valid alias configuration
after using description file: /usr/src/app/package.json (relative path: ./node_modules)
using description file: /usr/src/app/package.json (relative path: ./node_modules/@ionic/cloud)
no extension
Field ‘browser’ doesn’t contain a valid alias configuration
/usr/src/app/node_modules/@ionic/cloud doesn’t exist
.ts
Field ‘browser’ doesn’t contain a valid alias configuration
/usr/src/app/node_modules/@ionic/cloud.ts doesn’t exist
.js
Field ‘browser’ doesn’t contain a valid alias configuration
/usr/src/app/node_modules/@ionic/cloud.js doesn’t exist
.json
Field ‘browser’ doesn’t contain a valid alias configuration
/usr/src/app/node_modules/@ionic/cloud.json doesn’t exist
as directory
/usr/src/app/node_modules/@ionic/cloud doesn’t exist
[/usr/src/app/node_modules/@ionic/cloud]
[/usr/src/app/node_modules/@ionic/cloud.ts]
[/usr/src/app/node_modules/@ionic/cloud.js]
[/usr/src/app/node_modules/@ionic/cloud.json]
[/usr/src/app/node_modules/@ionic/cloud]
@ ./node_modules/@ionic/cloud-angular/dist/esm/index.js 17:0-29 20:0-266
@ ./src/app/app.module.ts
@ ./src/app/main.ts
at new BuildError (/usr/src/app/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
at callback (/usr/src/app/node_modules/@ionic/app-scripts/dist/webpack.js:121:28)
at emitRecords.err (/usr/src/app/node_modules/@ionic/app-scripts/node_modules/webpack/lib/Compiler.js:269:13)
at Compiler.emitRecords (/usr/src/app/node_modules/@ionic/app-scripts/node_modules/webpack/lib/Compiler.js:375:38)
at emitAssets.err (/usr/src/app/node_modules/@ionic/app-scripts/node_modules/webpack/lib/Compiler.js:262:10)
at applyPluginsAsyncSeries1.err (/usr/src/app/node_modules/@ionic/app-scripts/node_modules/webpack/lib/Compiler.js:368:12)
at next (/usr/src/app/node_modules/tapable/lib/Tapable.js:218:11)
at Compiler.compiler.plugin (/usr/src/app/node_modules/@ionic/app-scripts/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)
at Compiler.applyPluginsAsyncSeries1 (/usr/src/app/node_modules/tapable/lib/Tapable.js:222:13)
at Compiler.afterEmit (/usr/src/app/node_modules/@ionic/app-scripts/node_modules/webpack/lib/Compiler.js:365:9)
npm info lifecycle rnb-receiver@0.0.1~build: Failed to exec build script
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! rnb-receiver@0.0.1 build: ionic-app-scripts build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the rnb-receiver@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/2018-02-28T13_00_50_443Z-debug.log
npm run build failed
Running after script…
$ run "clean-up"
Running Stage clean-up for Job: 5349228
ERROR: Job failed: exit status 1

So any one can explain to me why this failing and how can I solve it.

Thanks.

I am sure someone will correct me if I am wrong but, ionic cloud no longer exists. It evolved into ionic pro and has its own separate plugin. Check this out.

Hope this helps

Hey @iecisit,

Thanks for your replay,

Yes you are alright. ionic cloud was causing this failing.

Thanks.