Skip to content

Create React App build creates empty folder #72

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

Closed
carapai opened this issue Aug 1, 2019 · 3 comments
Closed

Create React App build creates empty folder #72

carapai opened this issue Aug 1, 2019 · 3 comments

Comments

@carapai
Copy link

carapai commented Aug 1, 2019

Building the app creates an empty folder while using workerize-loader

@gedion
Copy link

gedion commented Dec 20, 2019

You probably have a webpack error in your worker file. The console.log hint below should be helpful.

facebook/create-react-app#8014 (comment)

@developit
Copy link
Owner

Indeed - this is a bug in CRA, so I'll close out this issue. Hopefully facebook/create-react-app#6286 gets merged soon!

@lbutler
Copy link

lbutler commented Mar 11, 2020

You probably have a webpack error in your worker file. The console.log hint below should be helpful.

facebook/create-react-app#8014 (comment)

The above was helpful in figuring out what was wrong, if you want to avoid branching and ejecting, the error could be a simple ESLint warning as well.

In my case, the error was ESLint being upset with me using self.postMessage() within the worker file.

ESLint would provide the following error Unexpected use of 'self'.eslint(no-restricted-globals) in VSCode. When the CRA bug above is fixed it will show up in the console and fail the build and you won't spend a bunch of time trying to figure out why the build silently failed.

My temporary fix was to add disable the ESLint rule for my workerfile as I wasn't sure how to do it correctly...

/* eslint-disable no-restricted-globals */

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants