Help with webpack config monorepo/workspace with drizzle, node:events build error. #65892
-
SummaryI've got a monorepo set up with database functions in packages/core. I'm not building this package, just importing directly from it, and webpack is complaining about My webpack config is currently
Would die for some guidance! Additional informationnode:events
Module build failed: UnhandledSchemeError: Reading from "node:events" is not handled by plugins (Unhandled scheme).
Webpack supports "data:" and "file:" URIs by default.
You may need an additional plugin to handle "node:" URIs.
at /home/dylan/finspotter/next-finspotter/node_modules/.pnpm/next@14.2.3_@babel+core@7.24.5_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/webpack/bundle5.js:28:401757
at Hook.eval [as callAsync] (eval at create (/home/dylan/finspotter/next-finspotter/node_modules/.pnpm/next@14.2.3_@babel+core@7.24.5_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/webpack/bundle5.js:13:28858), <anonymous>:6:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/dylan/finspotter/next-finspotter/node_modules/.pnpm/next@14.2.3_@babel+core@7.24.5_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/webpack/bundle5.js:13:26012)
at Object.processResource (/home/dylan/finspotter/next-finspotter/node_modules/.pnpm/next@14.2.3_@babel+core@7.24.5_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/webpack/bundle5.js:28:401682)
at processResource (/home/dylan/finspotter/next-finspotter/node_modules/.pnpm/next@14.2.3_@babel+core@7.24.5_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:5308)
at iteratePitchingLoaders (/home/dylan/finspotter/next-finspotter/node_modules/.pnpm/next@14.2.3_@babel+core@7.24.5_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4667)
at runLoaders (/home/dylan/finspotter/next-finspotter/node_modules/.pnpm/next@14.2.3_@babel+core@7.24.5_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:8590)
at NormalModule._doBuild (/home/dylan/finspotter/next-finspotter/node_modules/.pnpm/next@14.2.3_@babel+core@7.24.5_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/webpack/bundle5.js:28:401544)
at NormalModule.build (/home/dylan/finspotter/next-finspotter/node_modules/.pnpm/next@14.2.3_@babel+core@7.24.5_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/webpack/bundle5.js:28:403572)
at /home/dylan/finspotter/next-finspotter/node_modules/.pnpm/next@14.2.3_@babel+core@7.24.5_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/webpack/bundle5.js:28:82055
Import trace for requested module:
node:events
../../node_modules/.pnpm/drizzle-orm@0.30.10_@aws-sdk+client-rds-data@3.577.0_aws-crt@1.21.2__@types+react@18.3.2_@typ_ez3ywzp4zvxeu76juwbbeehb6u/node_modules/drizzle-orm/mysql2/session.js
../../node_modules/.pnpm/drizzle-orm@0.30.10_@aws-sdk+client-rds-data@3.577.0_aws-crt@1.21.2__@types+react@18.3.2_@typ_ez3ywzp4zvxeu76juwbbeehb6u/node_modules/drizzle-orm/mysql2/index.js
../core/src/drizzle/index.ts ExampleNo response |
Beta Was this translation helpful? Give feedback.
Answered by
dylanirion
May 20, 2024
Replies: 1 comment
-
Fairly certain this was due to a client-side import from the same file |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
dylanirion
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fairly certain this was due to a client-side import from the same file