1
chunk {0} runtime.06daa30a2963fa413676.js, runtime.06daa30a2963fa413676.js.map (runtime) 1.5 kB [entry] [rendered]
chunk {1} main.9868d9b237c3a48c54da.js, main.9868d9b237c3a48c54da.js.map (main) 182 bytes [initial] [rendered]
chunk {2} polyfills.85f47f0bf59079cbc23a.js, polyfills.85f47f0bf59079cbc23a.js.map (polyfills) 189 bytes [initial] [rendered]
chunk {3} styles.da6a8dc1b4027cfd731e.css, styles.da6a8dc1b4027cfd731e.css.map (styles) 338 kB [initial] [rendered]

ERROR in Invalid or unexpected token

I'm receiving the above error message on

ng build --prod

On other machines, the build works. Also, the debug build (ng serve) works as well. The error message provides no clue on where to start searching. What is the cause for this error and/or how can it be identified?

Here is some verion information:

Angular CLI: 6.0.8
Node: 6.8.0
OS: win32 x64
Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.6.8
@angular-devkit/core         0.6.8
@angular-devkit/schematics   0.6.8
@schematics/angular          0.6.8
@schematics/update           0.6.8
rxjs                         6.2.1
typescript                   2.7.2
5
  • try running it with --verbose=true Commented Mar 6, 2019 at 11:33
  • Since this seems a problem with your local machine, have you tried to re-clone the code into a fresh directory and then try again? Commented Mar 6, 2019 at 11:35
  • @JamieRees yes, with no success Commented Mar 6, 2019 at 11:37
  • you can also try to compare node.js versions. You seem to be running some old versions, angular included Commented Mar 6, 2019 at 11:39
  • thanks @PierreDuc, the node version it was! Commented Mar 7, 2019 at 10:25

2 Answers 2

1

The problem was solved updating to the current version of node.js.

Sign up to request clarification or add additional context in comments.

Comments

0

Checks your angular.json file. It might be difference between production and debug configurations.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.