Giter VIP home page Giter VIP logo

Comments (6)

tambien avatar tambien commented on June 11, 2024 1

I'm not familiar with vite, but just judging by the error, it says vite_ssr_import which might imply server-side rendering. it's possible that Tone.js (since it's designed for the browser) threw an error which stopped the rest of the loading

from tone.js.

yl92 avatar yl92 commented on June 11, 2024 1

Thank you @tambien , tone@next worked and there's no longer any errors 🙌

from tone.js.

yl92 avatar yl92 commented on June 11, 2024

With 14.9.17 is there any changes to how we should import Tone? This could be the same error, I'm also using import * as Tone from 'tone';.

new Tone.Reverb(c.reverbOptions); // note that this did not raise any error in TypeScript
results in error:
export 'Reverb' (imported as 'Tone') was not found in 'tone' (module has no exports) <- error in the browser

The same code works ok with 14.7.77.

from tone.js.

mediashock avatar mediashock commented on June 11, 2024

I think I have to initialize it inside the onmount. I just switched it to include it from a CDN and everything works but I read onmount is where code should be placed inside a svelte project.

from tone.js.

tambien avatar tambien commented on June 11, 2024

With 14.9.17 is there any changes to how we should import Tone? This could be the same error, I'm also using import * as Tone from 'tone';.

new Tone.Reverb(c.reverbOptions); // note that this did not raise any error in TypeScript results in error: export 'Reverb' (imported as 'Tone') was not found in 'tone' (module has no exports) <- error in the browser

The same code works ok with 14.7.77.

@yl92 could you try npm i tone@next? There might have been some breaks with the way the package is imported, if that's the case i'll promote the @next version to @latest to hopefully resolve this issue for anyone having it

from tone.js.

tambien avatar tambien commented on June 11, 2024

I think I have to initialize it inside the onmount. I just switched it to include it from a CDN and everything works but I read onmount is where code should be placed inside a svelte project.

Glad you got it working!

from tone.js.

Related Issues (20)

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.