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

**URL:** <https://forum.ionicframework.com/t/ionic-pro-v3-build-error-snapshot-sh-error-on-line-32-missing/106943>\
**Category:** ionic-v3\
**Created:** [September 27, 2017, 2:17pm UTC](https://forum.ionicframework.com/t/ionic-pro-v3-build-error-snapshot-sh-error-on-line-32-missing/106943 "2017-09-27T14:17:38Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![alesub](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/alesub/32/113689_2.png) [@alesub](https://forum.ionicframework.com/u/alesub)\
**Post date:** [September 27, 2017, 2:17pm UTC](https://forum.ionicframework.com/t/ionic-pro-v3-build-error-snapshot-sh-error-on-line-32-missing/106943/1 "2017-09-27T14:17:38Z")

</div>

Hi,

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

```auto
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"](https://forum.ionicframework.com/t/ionic-pro-build-failed/106479), but the solution in there is only for V1.

Thanks for any tips!

---

<div class="post-metadata">

**Author:** ![SS88UK](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/ss88uk/32/113576_2.png) [@SS88UK](https://forum.ionicframework.com/u/SS88UK)\
**Post date:** [September 27, 2017, 2:30pm UTC](https://forum.ionicframework.com/t/ionic-pro-v3-build-error-snapshot-sh-error-on-line-32-missing/106943/2 "2017-09-27T14:30:36Z")

</div>

Have you tried the solution?

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

> [@Ionic Pro: Build Failed "missing script: build"](https://forum.ionicframework.com/t/ionic-pro-build-failed/106479/23):
>
> For ionic1 project solved by adding missing lines to package.json: ... "scripts": { "build": "ls" }, ...

---

<div class="post-metadata">

**Author:** ![alesub](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/alesub/32/113689_2.png) [@alesub](https://forum.ionicframework.com/u/alesub)\
**Post date:** [September 27, 2017, 3:04pm UTC](https://forum.ionicframework.com/t/ionic-pro-v3-build-error-snapshot-sh-error-on-line-32-missing/106943/3 "2017-09-27T15:04:57Z")

</div>

Hi!

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

```auto
...
"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](http://snapshot.sh) error remains the same.

---

<div class="post-metadata">

**Author:** ![jeremyy7](https://avatars.discourse-cdn.com/v4/letter/j/3e96dc/32.png) [@jeremyy7](https://forum.ionicframework.com/u/jeremyy7)\
**Post date:** [September 27, 2017, 5:39pm UTC](https://forum.ionicframework.com/t/ionic-pro-v3-build-error-snapshot-sh-error-on-line-32-missing/106943/4 "2017-09-27T17:39:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [September 27, 2017, 6:06pm UTC](https://forum.ionicframework.com/t/ionic-pro-v3-build-error-snapshot-sh-error-on-line-32-missing/106943/5 "2017-09-27T18:06:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![alesub](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/alesub/32/113689_2.png) [@alesub](https://forum.ionicframework.com/u/alesub)\
**Post date:** [September 27, 2017, 6:10pm UTC](https://forum.ionicframework.com/t/ionic-pro-v3-build-error-snapshot-sh-error-on-line-32-missing/106943/6 "2017-09-27T18:10:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [September 27, 2017, 6:42pm UTC](https://forum.ionicframework.com/t/ionic-pro-v3-build-error-snapshot-sh-error-on-line-32-missing/106943/7 "2017-09-27T18:42:30Z")

</div>

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`

---

<div class="post-metadata">

**Author:** ![alesub](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/alesub/32/113689_2.png) [@alesub](https://forum.ionicframework.com/u/alesub)\
**Post date:** [September 27, 2017, 7:04pm UTC](https://forum.ionicframework.com/t/ionic-pro-v3-build-error-snapshot-sh-error-on-line-32-missing/106943/8 "2017-09-27T19:04:22Z")

</div>

Hi,

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

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

```

Thanks!

---

<div class="post-metadata">

**Author:** ![jeremyy7](https://avatars.discourse-cdn.com/v4/letter/j/3e96dc/32.png) [@jeremyy7](https://forum.ionicframework.com/u/jeremyy7)\
**Post date:** [September 27, 2017, 8:21pm UTC](https://forum.ionicframework.com/t/ionic-pro-v3-build-error-snapshot-sh-error-on-line-32-missing/106943/9 "2017-09-27T20:21:06Z")

</div>

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!
