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 TypeError: (0 , _workerized_filter_cities__WEBPACK_IMPORTED_MODULE_2__.getItems) is not a function #115

Closed
fitzage opened this issue May 30, 2022 · 15 comments

Comments

@fitzage
Copy link

fitzage commented May 30, 2022

This is part of what shows up in #113 and then probably #112, except I'm not getting the (apparently now fixed) undefined error, just the not a function errors related to the workerization.

I still get the rest of the error from #112, and it happens in my exercises for lessons 3 and 4 as well as the final versions. Here is a screenshot from the final for exercise 3, showing nothing rendering, and the console errors.

image

@fitzage
Copy link
Author

fitzage commented May 31, 2022

OK, this is very weird. I went back to the non-workerized filter-cities import, and was getting an error about how run from useAsync was not receiving a promise. I hadn’t had an issue with the non-workerized one before.

In an attempt to troubleshoot, I decided to add some console logging to the filter-cities.js file. I logged allItems and immediately the site started working. I removed the console log line and it stayed working. I don’t understand what was going on here. Now that this has started behaving, the workerized version works correctly also.

@kentcdodds
Copy link
Member

Well, let's chalk this one up as a fluke I guess 😅

Thanks for reporting back! Hopefully nobody else runs into this.

@androso
Copy link

androso commented Jun 6, 2022

image
I'm experiencing the same error, and the only solution i've found is to re install the project. It happened on local so i tried gitpod but it sill happens after some time, not sure why 😅

@ognyan-kostadinov
Copy link

Not a fluke, happened for me too. Just like @fitzage I played around with using the non-workerized getCities, console logging here and there to investigate etc and it magically started working. If it's not going to be fixed definitively, could you leave the issue open or write a remark on some more visible spot (like project's README or the exercise's MD file) to make the users aware of this? Thanks in advance, the training is awesome so far!

@mmskvortsov
Copy link

OK, this is very weird. I went back to the non-workerized filter-cities import, and was getting an error about how run from useAsync was not receiving a promise. I hadn’t had an issue with the non-workerized one before.

In an attempt to troubleshoot, I decided to add some console logging to the filter-cities.js file. I logged allItems and immediately the site started working. I removed the console log line and it stayed working. I don’t understand what was going on here. Now that this has started behaving, the workerized version works correctly also.

@fitzage Huh, I've just in exactly the same problem and console.log(allItems) did the fix. I'm soooo confused
@kentcdodds posting this just FYI :D

@lenniezelk
Copy link

@kentcdodds kindly reopen this, the issue is still happening

@kentcdodds kentcdodds reopened this Jul 15, 2022
@sunnatganiev
Copy link

The same error. The same attempt (console.log(allItems) in filter-cities.js). Worked!

@diomededavid
Copy link

The same error. Just pulled down repo today.

Screen Shot 2022-07-24 at 6 32 01 PM

@medoror
Copy link

medoror commented Jul 25, 2022

Seeing the exact same error above as well. Did the workerize api change?

@kentcdodds
Copy link
Member

My guess is there's a bug in workerize. Anyone can feel free to make a minimal reproduction and report it in the https://github.com/developit/workerize-loader issue tracker. Unfortunately I still can't reproduce this issue myself:

image

@diomededavid
Copy link

By adding export default class makeFilterCitiesWorker {} to the end of filter-cities.js is a potential solution.

@anthony-kyle
Copy link

Can confirm that this makes the error go away for me. I just cloned the repo today.

By adding export default class makeFilterCitiesWorker {} to the end of filter-cities.js is a potential solution.

@kentcdodds
Copy link
Member

Thanks! I'll just stick that in then 👍

@mary-davis
Copy link

Yesterday I was having this issue, so pulled this change which seemed to fix it. Today, problem was back even with this fix in. Followed the above tip to console.log allItems in filter-cities.js and that seemed to fix it for now.

@kentcdodds
Copy link
Member

Pretty sure this is a problem with workerize-loader. I'd anyone wants to dig further and file an issue on that project that would be the most helpful I think. At this point there isn't anything more we can do in this project.

@epicweb-dev epicweb-dev locked as resolved and limited conversation to collaborators Aug 17, 2022
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