0

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. (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
  • 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)" Commented Sep 14, 2022 at 18:30

1 Answer 1

0
  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.
Sign up to request clarification or add additional context in comments.

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.