node-sqlserver-v8 icon indicating copy to clipboard operation
node-sqlserver-v8 copied to clipboard

NextJS App Router: You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.

Open bradleyf opened this issue 9 months ago • 1 comments

I tried TimelordUK/todo-with-nextjs_msnodesqlv8, which works, but was written using the Nextjs PAGE router. When I convert it to using the APP router, I get this error.

./node_modules/msnodesqlv8/build/Release/sqlserverv8.node Module parse failed: Unexpected character '�' (1:0) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders (Source code omitted for this binary file)

Do you have the proper webpack config for Next.config.ts for making this work?

I've tried it in another project and I get the message that it can only run as a server component, even though I'm using it that way.

Please advise!

bradleyf avatar Apr 23 '25 17:04 bradleyf

Here's a similar message:

Error: Node.js binary module ./node_modules/.pnpm/[email protected]/node_modules/msnodesqlv8/build/Release/sqlserverv8.node is not supported in the browser. Please only use the module on server side

./node_modules/.pnpm/[email protected]/node_modules/msnodesqlv8/build/Release/sqlserverv8.node

Error: Node.js binary module ./node_modules/.pnpm/[email protected]/node_modules/msnodesqlv8/build/Release/sqlserverv8.node is not supported in the browser. Please only use the module on server side

bradleyf avatar Apr 23 '25 17:04 bradleyf