If you're experiencing issues, refer to the Github Repository here: https://github.com/kyledecot/next-worker-bug
Within my NextJS application, there is an NPM package that I have bundled using webpack/ts-loader. This package includes a web Worker & WorkerComponent.
My intention is to use npm install
to incorporate this package from npmjs into my NextJS application and utilize the worker as follows:
<App>
<WorkerComponent />
</App>
Currently, this setup is not functioning properly and generating the following error message:
../worker/lib/index.js (1:1323) @ eval
⨯ Error: Automatic publicPath is not supported in this browser
at eval (../worker/lib/index.js:51:27)
at eval (../worker/lib/index.js:53:11)
at eval (../worker/lib/index.js:67:7)
at eval (../worker/lib/index.js:3:32)
at eval (../worker/lib/index.js:5:2)
at (ssr)/../worker/lib/index.js (/Users/tabulous-xyz/Desktop/example/app/.next/server/app/page.js:173:1)
at __webpack_require__ (/Users/tabulous-xyz/Desktop/example/app/.next/server/webpack-runtime.js:33:42)
at eval (./src/app/page.tsx:7:64)
at (ssr)/./src/app/page.tsx (/Users/tabulous-xyz/Desktop/example/app/.next/server/app/page.js:162:1)
at Object.__webpack_require__ [as require] (/Users/tabulous-xyz/Desktop/example/app/.next/server/webpack-runtime.js:33:42)
at JSON.parse (<anonymous>)
digest: "3559072519"
https://i.sstatic.net/oktqrjA4.png
I'm uncertain whether this issue is related to NextJS, Webpack, or another factor altogether.