Skip to content

TypeError: Cannot read properties of undefined (reading '_report') at undefined:2:30224 #2145

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
kewlfool opened this issue Mar 3, 2023 · 7 comments

Comments

@kewlfool
Copy link

kewlfool commented Mar 3, 2023

Hi there,

i have a p5js sketch that works fine locally, but when i copy it on web editor it dont run.

TypeError: Cannot read properties of undefined (reading '_report')
at undefined:2:30224

@welcome
Copy link

welcome bot commented Mar 3, 2023

Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.

@parteekcoder
Copy link
Contributor

Can you please give the steps to reproduce it

And can you please also attach the screenshots for more clarity

@kewlfool
Copy link
Author

kewlfool commented Mar 4, 2023

Here is the link for sketch on web editor
https://editor.p5js.org/kewlfool/sketches/tvdNsR5H5

Also i created a repository that runs fine.

https://github.com/kewlfool/htmlJavascript

@parteekcoder
Copy link
Contributor

@kewlfool is it runs fine in your repository?

@kewlfool
Copy link
Author

kewlfool commented Mar 4, 2023

yes it runs fine locally,
doesnt work on web editor.

@lindapaiste
Copy link
Collaborator

Interesting issue. The problem here is a naming collision on Symbol.

Your code will work if you rename your Symbol class to MySymbol or anything else. Your class is conflicting with the built-in JavaScript Symbol object. Specifically, it creates trouble with the shim.js file in the p5 core.

@raclim
Copy link
Collaborator

raclim commented Mar 15, 2023

Agreed with the above! I think a secondary root cause of this issue stems from the 'index.html' file in the sketch you linked for the web editor. Within that file on line 8, it seems like you're using p5.js version 0.5.6 instead of 1.6.0.

Hope this was able to resolve your issue! I'm going to close this for now, but please feel free to reopen this or create a new one if it still persists for you.

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