Giter VIP home page Giter VIP logo

Comments (10)

saifullahakhtar avatar saifullahakhtar commented on May 6, 2024 1

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?

from next.

jamesrweb avatar jamesrweb commented on May 6, 2024 1

Yes @saifullahakhtar i will get to it asap, it's on my list of things to do

from next.

jamesrweb avatar jamesrweb commented on May 6, 2024 1

@saifullahakhtar I took a look and you didn't implement p5 sound exactly as guided and forgot to await the import of the sound library as one example of this.

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.

from next.

yevdyko avatar yevdyko commented on May 6, 2024

Hey @saifullahakhtar, thanks for sharing the issue. As far as I can see, it isn't related to the package itself. The error with window is related to Next.js, so you should refer to the documentation of this framework. The error with the sound loading is about the way the library was imported into the component.

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

from next.

yevdyko avatar yevdyko commented on May 6, 2024

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?

from next.

saifullahakhtar avatar saifullahakhtar commented on May 6, 2024

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.

from next.

saifullahakhtar avatar saifullahakhtar commented on May 6, 2024

@yevdyko, any help regarding this error please?

TypeError: p5.loadSound is not a function.

from next.

jamesrweb avatar jamesrweb commented on May 6, 2024

@saifullahakhtar im happy to help here but I need to know:

  • what have you tried so far?
  • have you got a repl which showcases the issue? We need one to verify and test.

from next.

saifullahakhtar avatar saifullahakhtar commented on May 6, 2024

Hello @jamesrweb, Thank you for your response, here's the code with the issue, you can test and verify.

https://stackblitz.com/edit/stackblitz-starters-ksxqpa

from next.

saifullahakhtar avatar saifullahakhtar commented on May 6, 2024

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.

from next.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.