Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails with "Unexpected token ] in JSON" after updating to version 9 #16024

Closed
filipesilva opened this issue Nov 1, 2019 · 3 comments · Fixed by #16062
Closed

Build fails with "Unexpected token ] in JSON" after updating to version 9 #16024

filipesilva opened this issue Nov 1, 2019 · 3 comments · Fixed by #16062
Assignees
Labels
Milestone

Comments

@filipesilva
Copy link
Contributor

This issue impacts 9.0.0-rc.0 and happened while updating https://github.com/SAP/cloud-commerce-spartacus-storefront.

After updating successfully to version 9, but build fails with Unexpected token ] in JSON at position 195 after seeming to finish successfully.

kamik@RED-X1C6 MINGW64 /d/sandbox/cloud-commerce-spartacus-storefront (update-9)
$ yarn build
yarn run v1.17.3
$ ng build storefrontapp --prod
Generating ES5 bundles for differential loading...
ES5 bundle generation complete.

chunk {0} runtime-es2015.52756d3ab8e6582f0541.js (runtime) 1.45 kB [entry] [rendered]
chunk {0} runtime-es5.52756d3ab8e6582f0541.js (runtime) 1.45 kB [entry] [rendered]
chunk {2} polyfills-es2015.9d25e173e20e35a89c7c.js (polyfills) 49.4 kB [initial] [rendered]
chunk {3} polyfills-es5.c526f8e419af7aac625d.js (polyfills-es5) 138 kB [initial] [rendered]
chunk {1} main-es2015.229b1ef42e6e191943e4.js (main) 1.29 MB [initial] [rendered]
chunk {1} main-es5.229b1ef42e6e191943e4.js (main) 1.5 MB [initial] [rendered]
chunk {4} styles.da4c41d41cbf7725e5f1.css (styles) 350 kB [initial] [rendered]
Date: 2019-11-01T18:08:48.998Z - Hash: 2dc34f91b4b37faf77fa - Time: 120820ms
Unexpected token ] in JSON at position 195
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@filipesilva filipesilva added type: bug/fix freq1: low Only reported by a handful of users who observe it rarely severity3: broken area: @angular-devkit/build-angular labels Nov 1, 2019
@filipesilva filipesilva added this to the 9.0.x milestone Nov 1, 2019
@alan-agius4
Copy link
Collaborator

The root cause of the issue seems to be the same as #15462 to be more precise the appendValueInAstArray

export function appendValueInAstArray(
method.

The failing part here is the SW generation and the error is coming from when trying to parse the ngsw config.

@alan-agius4
Copy link
Collaborator

Also related #14776

@alan-agius4 alan-agius4 self-assigned this Nov 4, 2019
vikerman pushed a commit that referenced this issue Nov 6, 2019
…ON when using different formatting

Fixes: #16024, fixes: #15462 and fixes: #14776
vikerman pushed a commit that referenced this issue Nov 6, 2019
…ON when using different formatting

Fixes: #16024, fixes: #15462 and fixes: #14776
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants