Build fails on first push


#1

Hello, I’m new to using Ionic, and I’m getting stuck at the same point every time because my build fails. All I’m doing is using ionic start --pro-id xxxxxxxx to create a project, then I use git push ionic master to kickoff a build, but the build fails when I check the dashboard. I haven’t even added any code, but the build is failing immediately after creation. This happens every time I create a new app, and I’ve been unable to successfully get past this step.

My computer:

  • Mac OSX Sierra 10.12.6

Software:

  • node v6* .11.2
  • cordova 7.1.0
  • ionic 3.19.0
  • npm 5.4.2

Templates tried:

  • Tabs, Blank, Super

Here’s the output with the errors:

Running with gitlab-ci-multi-runner 9.1.0 (0118d89)
  on Snapshot Builds (c9648220)
Using Shell executor...
Running on ip-10-2-174-188...
Cloning repository...
Cloning into '/home/gitlab-runner/builds/c9648220/0/project-1'...
Checking out 68fc40ba as master...
Skipping Git submodules setup
$ run "fetch-updates"
Running Stage fetch-updates for Job: 5173403
Checking for build process updates...
$ run "build-app"
Running Stage build-app for Job: 5173403
Parsing ionic.config.json for project settings
Project Settings:
	Name: MYAPP
	App ID: ************
	Type: ionic-angular
$ npm install --quiet --no-optional

> 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

> 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

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

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/@ionic/app-scripts/node_modules/chokidar/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"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/@angular/compiler-cli/node_modules/chokidar/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 1181 packages in 26.02s
$ 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 MYAPP@0.0.1~prebuild: MYAPP@0.0.1
npm info lifecycle MYAPP@0.0.1~build: MYAPP@0.0.1

> MYAPP@0.0.1 build /usr/src/app
> ionic-app-scripts build

[00:51:18]  ionic-app-scripts 3.1.5 
[00:51:18]  build dev started ... 
[00:51:18]  clean started ... 
[00:51:18]  clean finished in 1 ms 
[00:51:18]  copy started ... 
[00:51:18]  deeplinks started ... 
[00:51:18]  deeplinks finished in 148 ms 
[00:51:18]  transpile started ... 
[00:51:22]  transpile finished in 3.68 s 
[00:51:22]  preprocess started ... 
[00:51:22]  preprocess finished in less than 1 ms 
[00:51:22]  webpack started ... 
[00:51:22]  copy finished in 4.06 s 
[00:51:29]  ionic-app-script task: "build" 
[00:51:29]  Error: ./node_modules/@ionic/storage/dist/storage.js Module not found: Error: Can't resolve 'localforage' in 
            '/usr/src/app/node_modules/@ionic/storage/dist' resolve 'localforage' in 
            '/usr/src/app/node_modules/@ionic/storage/dist' Parsed request is a module using description file: 
            /usr/src/app/node_modules/@ionic/storage/package.json (relative path: ./dist) Field 'browser' doesn't 
            contain a valid alias configuration after using description file: 
            /usr/src/app/node_modules/@ionic/storage/package.json (relative path: ./dist) 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/localforage) no extension Field 'browser' doesn't contain a valid alias 
            configuration /usr/src/app/node_modules/localforage doesn't exist .ts Field 'browser' doesn't contain a 
            valid alias configuration /usr/src/app/node_modules/localforage.ts doesn't exist .js Field 'browser' doesn't 
            contain a valid alias configuration /usr/src/app/node_modules/localforage.js doesn't exist .json Field 
            'browser' doesn't contain a valid alias configuration /usr/src/app/node_modules/localforage.json doesn't 
            exist as directory /usr/src/app/node_modules/localforage doesn't exist 
            [/usr/src/app/node_modules/localforage] [/usr/src/app/node_modules/localforage.ts] 
            [/usr/src/app/node_modules/localforage.js] [/usr/src/app/node_modules/localforage.json] 
            [/usr/src/app/node_modules/localforage] @ ./node_modules/@ionic/storage/dist/storage.js 2:0-38 @ 
            ./node_modules/@ionic/storage/dist/index.js @ ./src/app/app.module.ts @ 
            ./src/app/main.ts,./node_modules/@ionic/storage/dist/storage.js Module not found: Error: Can't resolve 
            'localforage-cordovasqlitedriver' in '/usr/src/app/node_modules/@ionic/storage/dist' resolve 
            'localforage-cordovasqlitedriver' in '/usr/src/app/node_modules/@ionic/storage/dist' Parsed request is a 
            module using description file: /usr/src/app/node_modules/@ionic/storage/package.json (relative path: ./dist) 
            Field 'browser' doesn't contain a valid alias configuration after using description file: 
            /usr/src/app/node_modules/@ionic/storage/package.json (relative path: ./dist) 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/localforage-cordovasqlitedriver) no extension Field 'browser' doesn't contain 
            a valid alias configuration /usr/src/app/node_modules/localforage-cordovasqlitedriver doesn't exist .ts 
            Field 'browser' doesn't contain a valid alias configuration 
            /usr/src/app/node_modules/localforage-cordovasqlitedriver.ts doesn't exist .js Field 'browser' doesn't 
            contain a valid alias configuration /usr/src/app/node_modules/localforage-cordovasqlitedriver.js doesn't 
            exist .json Field 'browser' doesn't contain a valid alias configuration 
            /usr/src/app/node_modules/localforage-cordovasqlitedriver.json doesn't exist as directory 
            /usr/src/app/node_modules/localforage-cordovasqlitedriver doesn't exist 
            [/usr/src/app/node_modules/localforage-cordovasqlitedriver] 
            [/usr/src/app/node_modules/localforage-cordovasqlitedriver.ts] 
            [/usr/src/app/node_modules/localforage-cordovasqlitedriver.js] 
            [/usr/src/app/node_modules/localforage-cordovasqlitedriver.json] 
            [/usr/src/app/node_modules/localforage-cordovasqlitedriver] @ ./node_modules/@ionic/storage/dist/storage.js 
            3:0-66 @ ./node_modules/@ionic/storage/dist/index.js @ ./src/app/app.module.ts @ 
            ./src/app/main.ts,./node_modules/@angular/common/esm5/http.js Module not found: Error: Can't resolve 'tslib' 
            in '/usr/src/app/node_modules/@angular/common/esm5' resolve 'tslib' in 
            '/usr/src/app/node_modules/@angular/common/esm5' Parsed request is a module using description file: 
            /usr/src/app/node_modules/@angular/common/package.json (relative path: ./esm5) Field 'browser' doesn't 
            contain a valid alias configuration after using description file: 
            /usr/src/app/node_modules/@angular/common/package.json (relative path: ./esm5) 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/tslib) no extension Field 'browser' doesn't contain a valid alias 
            configuration /usr/src/app/node_modules/tslib doesn't exist .ts Field 'browser' doesn't contain a valid 
            alias configuration /usr/src/app/node_modules/tslib.ts doesn't exist .js Field 'browser' doesn't contain a 
            valid alias configuration /usr/src/app/node_modules/tslib.js doesn't exist .json Field 'browser' doesn't 
            contain a valid alias configuration /usr/src/app/node_modules/tslib.json doesn't exist as directory 
            /usr/src/app/node_modules/tslib doesn't exist [/usr/src/app/node_modules/tslib] 
            [/usr/src/app/node_modules/tslib.ts] [/usr/src/app/node_modules/tslib.js] 
            [/usr/src/app/node_modules/tslib.json] [/usr/src/app/node_modules/tslib] @ 
            ./node_modules/@angular/common/esm5/http.js 11:0-34 @ ./src/app/app.module.ts @ 
            ./src/app/main.ts,./node_modules/@angular/common/esm5/common.js Module not found: Error: Can't resolve 
            'tslib' in '/usr/src/app/node_modules/@angular/common/esm5' resolve 'tslib' in 
            '/usr/src/app/node_modules/@angular/common/esm5' Parsed request is a module using description file: 
            /usr/src/app/node_modules/@angular/common/package.json (relative path: ./esm5) Field 'browser' doesn't 
            contain a valid alias configuration after using description file: 
            /usr/src/app/node_modules/@angular/common/package.json (relative path: ./esm5) 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/tslib) no extension Field 'browser' doesn't contain a valid alias 
            configuration /usr/src/app/node_modules/tslib doesn't exist .ts Field 'browser' doesn't contain a valid 
            alias configuration /usr/src/app/node_modules/tslib.ts doesn't exist .js Field 'browser' doesn't contain a 
            valid alias configuration /usr/src/app/node_modules/tslib.js doesn't exist .json Field 'browser' doesn't 
            contain a valid alias configuration /usr/src/app/node_modules/tslib.json doesn't exist as directory 
            /usr/src/app/node_modules/tslib doesn't exist [/usr/src/app/node_modules/tslib] 
            [/usr/src/app/node_modules/tslib.ts] [/usr/src/app/node_modules/tslib.js] 
            [/usr/src/app/node_modules/tslib.json] [/usr/src/app/node_modules/tslib] @ 
            ./node_modules/@angular/common/esm5/common.js 7:0-44 @ 
            ./node_modules/@angular/platform-browser-dynamic/esm5/platform-browser-dynamic.js @ 
            ./src/app/main.ts,./node_modules/@angular/compiler/esm5/compiler.js Module not found: Error: Can't resolve 
            'tslib' in '/usr/src/app/node_modules/@angular/compiler/esm5' resolve 'tslib' in 
            '/usr/src/app/node_modules/@angular/compiler/esm5' Parsed request is a module using description file: 
            /usr/src/app/node_modules/@angular/compiler/package.json (relative path: ./esm5) Field 'browser' doesn't 
            contain a valid alias configuration after using description file: 
            /usr/src/app/node_modules/@angular/compiler/package.json (relative path: ./esm5) 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/tslib) no extension Field 'browser' doesn't contain a valid alias 
            configuration /usr/src/app/node_modules/tslib doesn't exist .ts Field 'browser' doesn't contain a valid 
            alias configuration /usr/src/app/node_modules/tslib.ts doesn't exist .js Field 'browser' doesn't contain a 
            valid alias configuration /usr/src/app/node_modules/tslib.js doesn't exist .json Field 'browser' doesn't 
            contain a valid alias configuration /usr/src/app/node_modules/tslib.json doesn't exist as directory 
            /usr/src/app/node_modules/tslib doesn't exist [/usr/src/app/node_modules/tslib] 
            [/usr/src/app/node_modules/tslib.ts] [/usr/src/app/node_modules/tslib.js] 
            [/usr/src/app/node_modules/tslib.json] [/usr/src/app/node_modules/tslib] @ 
            ./node_modules/@angular/compiler/esm5/compiler.js 6:0-44 @ 
            ./node_modules/@angular/platform-browser-dynamic/esm5/platform-browser-dynamic.js @ 
            ./src/app/main.ts,./node_modules/@angular/core/esm5/core.js Module not found: Error: Can't resolve 'tslib' 
            in '/usr/src/app/node_modules/@angular/core/esm5' resolve 'tslib' in 
            '/usr/src/app/node_modules/@angular/core/esm5' Parsed request is a module using description file: 
            /usr/src/app/node_modules/@angular/core/package.json (relative path: ./esm5) Field 'browser' doesn't contain 
            a valid alias configuration after using description file: 
            /usr/src/app/node_modules/@angular/core/package.json (relative path: ./esm5) 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/tslib) no extension Field 'browser' doesn't contain a valid alias 
            configuration /usr/src/app/node_modules/tslib doesn't exist .ts Field 'browser' doesn't contain a valid 
            alias configuration /usr/src/app/node_modules/tslib.ts doesn't exist .js Field 'browser' doesn't contain a 
            valid alias configuration /usr/src/app/node_modules/tslib.js doesn't exist .json Field 'browser' doesn't 
            contain a valid alias configuration /usr/src/app/node_modules/tslib.json doesn't exist as directory 
            /usr/src/app/node_modules/tslib doesn't exist [/usr/src/app/node_modules/tslib] 
            [/usr/src/app/node_modules/tslib.ts] [/usr/src/app/node_modules/tslib.js] 
            [/usr/src/app/node_modules/tslib.json] [/usr/src/app/node_modules/tslib] @ 
            ./node_modules/@angular/core/esm5/core.js 6:0-44 @ ./src/app/app.module.ts @ 
            ./src/app/main.ts,./node_modules/@angular/forms/esm5/forms.js Module not found: Error: Can't resolve 'tslib' 
            in '/usr/src/app/node_modules/@angular/forms/esm5' resolve 'tslib' in 
            '/usr/src/app/node_modules/@angular/forms/esm5' Parsed request is a module using description file: 
            /usr/src/app/node_modules/@angular/forms/package.json (relative path: ./esm5) Field 'browser' doesn't 
            contain a valid alias configuration after using description file: 
            /usr/src/app/node_modules/@angular/forms/package.json (relative path: ./esm5) 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/tslib) no extension Field 'browser' doesn't contain a valid alias 
            configuration /usr/src/app/node_modules/tslib doesn't exist .ts Field 'browser' doesn't contain a valid 
            alias configuration /usr/src/app/node_modules/tslib.ts doesn't exist .js Field 'browser' doesn't contain a 
            valid alias configuration /usr/src/app/node_modules/tslib.js doesn't exist .json Field 'browser' doesn't 
            contain a valid alias configuration /usr/src/app/node_modules/tslib.json doesn't exist as directory 
            /usr/src/app/node_modules/tslib doesn't exist [/usr/src/app/node_modules/tslib] 
            [/usr/src/app/node_modules/tslib.ts] [/usr/src/app/node_modules/tslib.js] 
            [/usr/src/app/node_modules/tslib.json] [/usr/src/app/node_modules/tslib] @ 
            ./node_modules/@angular/forms/esm5/forms.js 6:0-44 @ 
            ./node_modules/ionic-angular/components/select/select.js @ ./node_modules/ionic-angular/index.js @ 
            ./src/app/app.module.ts @ 
            ./src/app/main.ts,./node_modules/@angular/platform-browser-dynamic/esm5/platform-browser-dynamic.js Module 
            not found: Error: Can't resolve 'tslib' in 
            '/usr/src/app/node_modules/@angular/platform-browser-dynamic/esm5' resolve 'tslib' in 
            '/usr/src/app/node_modules/@angular/platform-browser-dynamic/esm5' Parsed request is a module using 
            description file: /usr/src/app/node_modules/@angular/platform-browser-dynamic/package.json (relative path: 
            ./esm5) Field 'browser' doesn't contain a valid alias configuration after using description file: 
            /usr/src/app/node_modules/@angular/platform-browser-dynamic/package.json (relative path: ./esm5) 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/tslib) no extension Field 'browser' doesn't contain 
            a valid alias configuration /usr/src/app/node_modules/tslib doesn't exist .ts Field 'browser' doesn't 
            contain a valid alias configuration /usr/src/app/node_modules/tslib.ts doesn't exist .js Field 'browser' 
            doesn't contain a valid alias configuration /usr/src/app/node_modules/tslib.js doesn't exist .json Field 
            'browser' doesn't contain a valid alias configuration /usr/src/app/node_modules/tslib.json doesn't exist as 
            directory /usr/src/app/node_modules/tslib doesn't exist [/usr/src/app/node_modules/tslib] 
            [/usr/src/app/node_modules/tslib.ts] [/usr/src/app/node_modules/tslib.js] 
            [/usr/src/app/node_modules/tslib.json] [/usr/src/app/node_modules/tslib] @ 
            ./node_modules/@angular/platform-browser-dynamic/esm5/platform-browser-dynamic.js 10:0-34 @ 
            ./src/app/main.ts,./node_modules/@angular/platform-browser/esm5/platform-browser.js Module not found: Error: 
            Can't resolve 'tslib' in '/usr/src/app/node_modules/@angular/platform-browser/esm5' resolve 'tslib' in 
            '/usr/src/app/node_modules/@angular/platform-browser/esm5' Parsed request is a module using description 
            file: /usr/src/app/node_modules/@angular/platform-browser/package.json (relative path: ./esm5) Field 
            'browser' doesn't contain a valid alias configuration after using description file: 
            /usr/src/app/node_modules/@angular/platform-browser/package.json (relative path: ./esm5) 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/tslib) no extension Field 'browser' doesn't contain 
            a valid alias configuration /usr/src/app/node_modules/tslib doesn't exist .ts Field 'browser' doesn't 
            contain a valid alias configuration /usr/src/app/node_modules/tslib.ts doesn't exist .js Field 'browser' 
            doesn't contain a valid alias configuration /usr/src/app/node_modules/tslib.js doesn't exist .json Field 
            'browser' doesn't contain a valid alias configuration /usr/src/app/node_modules/tslib.json doesn't exist as 
            directory /usr/src/app/node_modules/tslib doesn't exist [/usr/src/app/node_modules/tslib] 
            [/usr/src/app/node_modules/tslib.ts] [/usr/src/app/node_modules/tslib.js] 
            [/usr/src/app/node_modules/tslib.json] [/usr/src/app/node_modules/tslib] @ 
            ./node_modules/@angular/platform-browser/esm5/platform-browser.js 8:0-44 @ ./src/app/app.module.ts @ 
            ./src/app/main.ts 
Error: ./node_modules/@ionic/storage/dist/storage.js

[MORE ERRORS HERE…]

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! MYAPP@0.0.1 build: `ionic-app-scripts build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the MYAPP@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-12-16T00_51_29_066Z-debug.log
npm run build failed
Running after script...
$ run "clean-up"
Running Stage clean-up for Job: 5173403
ERROR: Job failed: exit status 1