App says Build failed when loading from git


#1

When I upload a project from git I get an error that says Build failed:

Running with gitlab-ci-multi-runner 9.1.0 (0118d89)
on Snapshot Builds (c9648220)
Using Shell executor…
Running on ip-10-2-1-50…
Cloning repository…
Cloning into ‘/home/gitlab-runner/builds/c9648220/0/project-1’…
Checking out 0ee8ab48 as master…
Skipping Git submodules setup
$ run "fetch-updates"
Checking for build process updates…
$ run "build-app"
Attempting to restore cached packages…
No cache found for packages, installing…
$ npm install --quiet --no-optional
npm WARN @ionic-native/camera@4.3.1 requires a peer of @ionic-native/core@^4.2.0 but none was installed.
npm WARN @ionic-native/image-picker@4.3.1 requires a peer of @ionic-native/core@^4.2.0 but none was installed.
npm WARN @ionic-native/network@4.3.3 requires a peer of @ionic-native/core@^4.2.0 but none was installed.
npm WARN ajv-keywords@2.1.0 requires a peer of ajv@>=5.0.0 but none was installed.

added 1 package and removed 3 packages in 4.4s
Saving package cache…
Package cache saved!
$ 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 homeinspectorplus@0.0.1~prebuild: homeinspectorplus@0.0.1
npm info lifecycle homeinspectorplus@0.0.1~build: homeinspectorplus@0.0.1

homeinspectorplus@0.0.1 build /usr/src/app
ionic-app-scripts build

sh: 1: ionic-app-scripts: Permission denied
npm info lifecycle homeinspectorplus@0.0.1~build: Failed to exec build script
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! homeinspectorplus@0.0.1 build: ionic-app-scripts build
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the homeinspectorplus@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-04T18_50_38_795Z-debug.log
npm run build failed
Running after script…
$ run "clean-up"
ERROR: Job failed: exit status 1

Any ideas what I can do to fix this?


#2

What is you ionic info output?


#3

This:

cli packages: (/Users/ohms/.nvm/versions/node/v8.1.0/lib/node_modules)

@ionic/cli-utils  : 1.18.0

ionic (Ionic CLI) : 3.18.0

global packages:

cordova (Cordova CLI) : 7.1.0

local packages:

@ionic/app-scripts : 2.1.4

Cordova Platforms  : android 6.2.3

Ionic Framework    : ionic-angular 3.6.1

System:

Node  : v8.1.0

npm   : 5.4.0

OS    : macOS Sierra

Xcode : Xcode 9.1 Build version 9B55

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : pro

#4

ok, this is an issue with what’s in your package.json file. When you push up to pro site, all it does is an

npm install

is all its doing and reporting, you can see this if you get your git into a new folder from your repo and do npm install…

if you do

let say for “npm WARN @ionic-native/camera@4.3.1 requires a peer of @ionic-native/core@^4.2.0 but none was installed.”

npm ls camera

you can see where the dependency maybe off


#5

Ok thank you, but how would I fix it?


#6

you would have to find out which packages are the culprits and go thru the proper uninstall process for each and reinstall


#7

I have resolved the problem but now I am experiencing a new one. It is
saying the
Node Sass could not find a binding for your current environment: Linux
64-bit with Node.js 8.x Found bindings for the following environments: - OS
X 64-bit with Node.js 8.x This usually happens because your environment has
changed since running npm install. Run npm rebuild node-sass --force to
build the binding for your current environment.

I am able to run npm rebuild node-sass here but when it uploads it to ionic
dashboard it gives the error. Any suggestions?