Ionic Pro: Build Failed "missing script: build"

Hi,

Can anyone help me. I’ve been building my project fine (online builder), until yesterday evening where it stopped. The error is below. I don’t think it’s to do with my files/app, but maybe someone with more experience can help?

XXXXXXXXX is the build ID / app name.

Running with gitlab-ci-multi-runner 9.1.0 (0118d89)
  on IonicJS Runner 2 (7981969b)
Using Shell executor...
Running on ip-10-2-240-118...
Cloning repository...
Cloning into '/home/gitlab-runner/builds/7981969b/0/project-1'...
Checking out XXXXXXXXX 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 com.XXXXXXXXX@0.0.1 No repository field.
npm WARN com.XXXXXXXXX@0.0.1 No license field.
npm WARN The package @ionic/cli-plugin-cordova is included as both a dev and production dependency.
npm WARN The package @ionic/cli-plugin-ionic1 is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (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 202 packages, removed 286 packages and updated 6 packages in 14.993s
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 ERR! missing script: build

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/gitlab-runner/.npm/_logs/2017-09-23T11_48_51_516Z-debug.log
/snapshot.sh: line 32: [: missing `]'
npm run build failed
Make sure your project has a build script in the package.json
Failed to upload build to storage please retry your build.
Running after script...
$ clean-up
Cleaning up files...
Successful clean up
ERROR: Job failed: exit status 1
3 Likes

Hi,

I have got the same problem today(exactly the same error too). It was working fine yesterday.
I’m stuck on this for more than 2 hours, couldn’t figure out which problem is that, also can’t find this complete log that it is mentioned.
Could it be a coincidence or maybe some problem in the Ionic online builder?
Thanks

I think it could be a problem with Ionic. I’m still testing :frowning:

I opened a ticket in an effort to help.

Hi SS88UK,

Did you receive some news about, build fail?

thanks

Not yet. I’ll update it here when I do! :slight_smile:

Banging my head what happened… my build was doing good till a couple of days back. Comforting to see that its Ionic’s problem but not with my code… Thanks for sharing this…

Guys, good morning
Just a question, did you use, ionic1 or ionic 2?

Because, yesterday during to try to discover something, i did a simple project with sidemenu in ionic 2, and my build is ok, so my real project is in ionic 1, that’s it happening in ionic 1 build.

Mine is Ionic 1 - yes. It was working 4 days ago because that’s when I last built code.

I was adding www folder till now and noticed that when ionic recognizes www folder, its assuming it as ionic 1.

Fetching build dependencies...
Detected www/ directory commited to version control. Assuming Ionic 1 app.
Running: npm install

Regardless of including or removing www folder, I am getting the same. I am using Ionic 3

Same issue - Ionic 1, was working fine until a few days ago. Failing now with same error as OP.

Same issue with Ionic 1. Its work good with ionic 2

Im experiencing same error. i think it’s a node version problem. i am using the stabled version of node v6.11.0 online builder is using v8.2.1. im also using ionic 1

I have the same problem here :frowning:

Ionic 1

It was working last week.

Hey Fellas,

Someone did receive, some answer about your build fail case? from Ionic support?

cheers!

Not yet! Still waiting. :frowning:

same problem here anyone found a solution

Im working with Ionic 1 and i have the same issue. Please help me build on Ionic Pro.

“Make sure your project has a build script in the package.json”

Having same issue, started with a clean ionic project type ionic1. Build is failing with the same error No build script

If you do a project in ionic 3 do you still have that problem??

i am trying to move an ionic1 project to use ionic pro to do the builds. I used to use intel xdk to do the builds, but they shut down their build servers, i can try it with ionic 3 but that wont do much good for me even if it works :stuck_out_tongue: