Replies: 3 comments 2 replies
-
alphaTab itself is mainly using ESM (thats the type: module). But in the package.json there are declarations for CJS and ESM consumers of the package. Same for the Webpack and Vite plugins: https://github.com/CoderLine/alphaTab/blob/develop/package.json#L26-L29 Normally this should resolve the correct things. Can you spin up an example repo for troubleshooting? |
Beta Was this translation helpful? Give feedback.
-
Can you give v1.4.4 a try? It should mitigate the problem. |
Beta Was this translation helpful? Give feedback.
-
Alas, no luck with v1.4.4. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am attempting to use alphaTab with NextJS.
I believe that in order to do so, I need to configure WebPack so that the background workers are available for use.
As such, I have the following
next.config.ts
:When I attempt to run my dev server,
npm run dev
, I see the following error:Now, digging into the
alphaTab.webpack.js
file in my node_modules, I see the following:As expected.
I believe the problem may be that my Javascript environment is expecting this to be an ESModule, but it is actually CommonJS.
Looking into
node_modules/@coderline/alphatab/package.json
, I see this:That is,
"type": "module",
. So, this is maybe what is causing my Javascript environment to think this is a ESModule, not CommonJS?Is this perhaps an error?
Beta Was this translation helpful? Give feedback.
All reactions