Closed lucpotage closed 2 years ago
I just checked - for some reason I needed to re-install with npm init tone
but import * as Tone from 'tone'
works for me in a vanilla JS project.
Try also installing tone@next
which changes the browser entry point (#914) and may also fix this issue.
It may be related to Nuxt 3 which is still in beta. I close bug since I didn't get any problem with a simple Vite.js starter project. Thanks for your help.
I'm getting this same error when I try importing in next
^12.1.0
. I tried both tone and tone@next.
I think it has to do with not having extensions (--es-module-specifier-resolution=node). If I manually change the import to "./core/Global.js";
in the library it finds it and then moves on to complain about export * from "./classes";
I'm having this issue with next.js as well, see #1077
Any fix for this? Why was it closed?
Update: I got it to work by using npm instead of yarn. Not sure why one would work and not the other. I've never seen anything like this before.
I got Tone v^14.8.49 to work in Next.js v14.0.2 this way (on my component using Tone):
"use client";
import * as Tone from "tone/build/esm/index";
FYI I'm using Vite 5.0.12 and using SSG in Qwik and I found no solution other than to stick to 14.7
I got Tone v^14.8.49 to work in Next.js v14.0.2 this way (on my component using Tone):
"use client"; import * as Tone from "tone/build/esm/index";
The same issue is with the same version of tone as well. Do you have any workaround for this?
I tried to use Tone.js on a new Nuxt 3 project. Unfortunately, I get the following error:
I import Tone this way:
Also tested this way:
I tried with the latest version and the next version without success. Any idea of what could be wrong?