1

I am new to Angular and I have an error with my code that I do not understand. I am in the process of building an e-Commerce site with anguar (version 8). the project was almost done when i did an "ng build" to generate the "dist" folder. and it worked very well. But after, the project is not finished, I made some modification to get a final version, but when I do "ng build" now it doesn't work anymore. it generates an error:

ERROR in ./node_modules/core-js/modules/es.regexp.exec.js 1:3 Module parse failed: Unexpected character '' (1:3) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders (Source code omitted for this binary file) @ ./node_modules/core-js/es/regexp/index.js 3:0-39 @ ./node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/es5-polyfills.js @ multi ./node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/es5-polyfills.js zone.js/dist/zone-legacy ./node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/jit-polyfills.js ./node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/es5-jit-polyfills.js ./src/polyfills.ts 

I don't understand what this is for. can someone please help me? Thank you !!

2
  • can provide any sample code? I think this problem has a lot of reason, Commented Sep 19, 2020 at 13:36
  • have you checked if the file (I am assuming UTF-8) has a BOM (Byte Order Mark) if so, delete it. also check for non-printable characters in the file. Commented Sep 18, 2023 at 19:57

1 Answer 1

0

I had the same issue every time I restart my PC. I don't know way but I always get over it by deleting the node modules folder and reinstalling them again

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.