简体   繁体   中英

React Build static folder js files are full of errors which are creating trouble after deployment

I created a website on react. I works great on localhost/3000 and no errors at all. But when I created the build by npm run build

  1. Its all js files are full of error i) Tokenization is skipped for long lines for performance reasons. This can be configured via editor.maxTokenizationLineLength. Tokenization is skipped for long lines for performance reasons. This can be configured via editor.maxTokenizationLineLength. (I extended the length from settings still getting the message.) ii) Expected an assignment or function call and instead saw an impression (101+ times this error)
  2. Still I deployed it on dreamhost server and It's deployed but when you reload the page 404 error.
  3. If I open the website on mobile some pages stuck and don't scroll. And then you get the error 404 page not found.

Why the build is behaving like this when there's no error in my react app. Then build should also be error free.

  1. Please check all the env variables are available during your build process
  2. Please try to figure out which code generates this error

"Expected an assignment or function call and instead saw an impression (101+ times this error)"

  1. Please check if the api calls to server are successful or not by checking the network tab in browser in your broken deployment
  2. If they fail, please check if your server url depends on env variables that are not available at build time Or on the hosting environment which generates the build.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM