Replies: 3 comments
-
|
The failing job encountered a Nuxt build error related to circular worker imports in the file node_modules/@transcribe/shout/src/shout/shout.wasm.js. Vite (used by Nuxt 3) does not support circular imports, which are causing the build to break. Solution Steps: Inspect and Break the Circular Import Chain Open node_modules/@transcribe/shout/src/shout/shout.wasm.js and review all its imports and exports. Refactor code so that shout.wasm.js does not import itself (directly or indirectly). If there’s shared logic, move it to a separate utility file (e.g., utils.js) that both files can import without referencing each other: js // In shout.wasm.js // In other files previously importing shout.wasm.js Check if there’s an updated version of @transcribe/shout that fixes this issue. Run: If you must build with a circular dependency temporarily, you might use rollup-plugin-circular-dependency, but beware this is not a long-term solution for Vite+Nuxt. Suppose shout.wasm.js contains: js js If you need help with the specific code for shout.wasm.js, paste its contents here and I can suggest an edit directly. |
Beta Was this translation helpful? Give feedback.
-
|
Have you excluded the wasm file from dependency optimization like in a vue app? Also be aware that transcribe.js can only be run on the client and will not work in SSR. Friendly advice: Please don't copy paste AI generated analysis of issues. |
Beta Was this translation helpful? Give feedback.
-
|
I've created an example for Nuxt. Please see the code in the examples repo The relevant parts are in the nuxt.config.ts and the implementation in index.vue . Let me know if this helps. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
It worked locally, but circleci gave me this error when building it out.
[error] x Build failed in 15.27s
[error] Nuxt Build Error: [commonjs--resolver] Circular worker imports detected. Vite does not support it. Import chain: node_modules/@transcribe/shout/src/shout/shout.wasm.js -> node_modules/@transcribe/shout/src/shout/shout.wasm.js
file: /root/project/node_modules/@transcribe/shout/src/shout/shout.wasm.js
file: node_modules/@transcribe/shout/src/shout/shout.wasm.js
at bundleWorkerEntry (node_modules/vite/dist/node/chunks/dep-D8YhmIY-.js:48121:11)
at workerFileToUrl (node_modules/vite/dist/node/chunks/dep-D8YhmIY-.js:48202:31)
at Object.transform (node_modules/vite/dist/node/chunks/dep-D8YhmIY-.js:48637:32)
at async transform (node_modules/rollup/dist/es/shared/node-entry.js:18645:16)
at async ModuleLoader.addModuleSource (node_modules/rollup/dist/es/shared/node-entry.js:18861:36)
Exited with code exit status 1
Beta Was this translation helpful? Give feedback.
All reactions