Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught ReferenceError: webpackJsonp is not defined #4017

Closed
1 task done
Vadorequest opened this issue Mar 15, 2018 · 1 comment
Closed
1 task done

Uncaught ReferenceError: webpackJsonp is not defined #4017

Vadorequest opened this issue Mar 15, 2018 · 1 comment

Comments

@Vadorequest
Copy link
Contributor

  • I have searched the issues of this repository and believe that this is not a duplicate.

I built my Next app and deployed it as I usually do, but when loading the page, I got the following on the browser:

Uncaught ReferenceError: webpackJsonp is not defined in main.js 1:1

Also, all JS interactivity was broken, but the style/design of the website was looking okay.

Here is the beginning of main.js file:

module.exports =
webpackJsonp([0],{

I rebuilt and redeployed the application and it disappeared.

I believe it is because I had a running Next.js app while building, and I was changing the code on it, which trigger other rebuilds. It probably messed up the build process (the first main.js wasn't uglified at all, while the new/fixed version I have now is correctly uglified/onelined)

I'm reporting the issue because I could have not noticed it, maybe something should be done when a build is ran when another build is in process. The main issue is deploying a non-working app to production without noticing it. I agree that's a very particular use case, which is very hard to reproduce. People shouldn't be building while doing modification to the source code with a watcher enabled. =D

@timneutkens
Copy link
Member

Not much we can do on our side. You can just build to a different directory and then move the directory to .next afterwards.

@lock lock bot locked as resolved and limited conversation to collaborators Mar 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants