Issue
When I try to production build angular, i encountered the error 'Unexpected character '@' [scripts.*.js]'. Production command ng build --prod
Angular version: 7.* Node modules used : 1. ag-grid
Solution
When anyone gets the error 'Unexpected character '@' [scripts..js]' or 'Unexpected token ',' [scripts..js]'. The above error could be from our code or the node_modules which we would have installed.
Error : You can see the error here
To find the source, execute the command ng build --prod --source-map
After executing source map, we can get the source file that causes error
The above command would point us to the file that causes the error while taking a production build.
If the command doesn't point to the source, please ensure that sourcemap=true in angular.json for production is true
Answered By - Mohan Stanky
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.