Ionic Pro: V3 Build error: snapshot.sh Error on line 32: missing ']'


#1

Hi,

I’m new at Ionic, I’m trying to deploy a very small app at ionicjs.com but I’m getting the following error after pushing any commit:

Running with gitlab-ci-multi-runner 9.1.0 (0118d89)
  on IonicJS Runner 2 (7981969b)
Using Shell executor...
Running on ip-10-2-50-250...
Cloning repository...
Cloning into '/home/gitlab-runner/builds/7981969b/0/project-1'...
Checking out 545bdedc as master...
Skipping Git submodules setup
$ fetch-updates
Checking for build process updates...
$ build-app
Fetching build dependencies...
Running: npm install
npm WARN Invalid version: "1.0"
npm WARN app No description
npm WARN app No repository field.
npm WARN app No README data
npm WARN app No license field.

added 55 packages in 4.188s
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! Invalid version: "1.0"

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/gitlab-runner/.npm/_logs/2017-09-27T14_07_27_193Z-debug.log
/snapshot.sh: line 32: [: missing `]'
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

I see a similar thread at Ionic Pro: Build Failed "missing script: build", but the solution in there is only for V1.

Thanks for any tips!


#2

Have you tried the solution?

i.e. adding this to your code package.json file:


#3

Hi!

Thanks for the quick reply. That solution didn’t work, it’s only for V1, in V2 the package.json looks like this:

...
"scripts": {
    ...
    "build": "ionic-app-scripts build",
    ...
}

I tried setting “ls” in the build parameter just for a quick test, but as expected it doesn’t work, the snapshot.sh error remains the same.


#4

Same issue here and received the same responses. I still have not figured it out and Ionic has not responded to my emails either.

Do you know where that file is? I was considering trying to read through the code and figure out what’s missing.


#5

Hey folks! Let me check with the Pro team and see whats going on!


#6

The file is not in the project folder, I searched for it in through the folders and through the code. It appears to be in the environment that builds the binaries.


#7

Hey folks, looking at the error, it could be related to a bad version in your package.json. Open your package.json and make sure the version entry is x.x.x and not just x.x, so 1.0.0 instead of 1.0


#8

Hi,

Not sure if that solved the issue, now the error is the following:

$ build-app
Fetching build dependencies...
Running: npm install
npm ERR! code E404
npm ERR! 404 Not Found: com.pylonproducts.wifiwizard@~0.2.11

Thanks!


#9

I had to fix some additional issues with packages (unrelated to original error) and now everything is working! Simply adding the version fixed my issues!