-
Notifications
You must be signed in to change notification settings - Fork 2
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
window is not defined & p5.loadSound is not a function #51
Comments
Hey @saifullahakhtar, thanks for sharing the issue. As far as I can see, it isn't related to the package itself. The error with If you need more specific advice, e.g. chat gpt can provide a couple of good tips on where to look, or read the documentation of Next.js and p5 in more detail |
I think we can add a proper example of using p5 addons along with Next.js and the p5 wrapper in the README on our end. WDYT @jamesrweb? |
Hello @yevdyko, thank you for your response and suggestion, It'd be really helpful if you guys can add a proper example of using p5 addons and p5 wrapper along with Next.js. |
Hi @yevdyko, I've resolved the 1st issue of "window is not defined" but I'm still having this error below: TypeError: p5.loadSound is not a function. Could you please give me any advice? |
@yevdyko, any help regarding this error please? TypeError: p5.loadSound is not a function. |
@saifullahakhtar im happy to help here but I need to know:
|
Hello @jamesrweb, Thank you for your response, here's the code with the issue, you can test and verify. |
Hello @jamesrweb, I'm reaching out regarding the code issue I mentioned earlier. Could you please take a moment to review the code snippet below and provide your insight? Your expertise would be incredibly helpful in resolving this matter. |
Yes @saifullahakhtar i will get to it asap, it's on my list of things to do |
@saifullahakhtar I took a look and you didn't implement p5 sound exactly as guided and forgot to Furthermore, NextJS is tricky with top level await statements though and so you need to look upstream at both NextJS and P5 to figure that one out, this library is working as it should and the issue lays with one of those projects, most probably NextJS itself. This being the case I will now close the issue. |
Hello, I'm having the two errors below in NextJS version 14, could anyone please check and let me know if I'm doing any mistake?
P5 Sketch Component
Main file, where I'm loading component:
The text was updated successfully, but these errors were encountered: