-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module not found: Can't resolve '../build/Release/sqlserverv8' #310
Comments
is it simiar to this |
https://github.com/eisberg-labs/nextjs-node-loader does this help at all |
Hi thank you, I install the package and add to my next.config this: const nextConfig = { But I did not solve, do I have to install webpack? I did not add it, I did not use it |
for now can you try this yarn add nextjs-node-loader --save-dev edit node_modules/msnodesqlv8/lib/util.js and add .node on end const utilModule = ((() => {
const { QueryAggregator } = require('./query-aggregator')
const { SchemaSplitter } = require('./shema-splitter')
const cppDriver = require('../build/Release/sqlserverv8.node') next.config.js/** @type {import('next').NextConfig} */
module.exports = {
experimental: {
serverActions: true
},
reactStrictMode: true,
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'raw.githubusercontent.com',
port: '',
pathname: '/VittorioMorellini/articles/main/images/**',
},
],
},
webpack: (config, options) => {
// console.log('HERE WE ARE')
config.module.rules.push({
test: /\.node$/,
use: [
{
loader: "nextjs-node-loader",
options: {
outputPath: config.output.path
}
},
],
})
return config
}
} yarn run v1.22.21
$ next dev
▲ Next.js 13.5.6
- Local: http://localhost:3000
- Environments: .env.development
- Experiments (use at your own risk):
· serverActions
✓ Ready in 2.5s
○ Compiling /page ...
✓ Compiled /page in 4.1s (1511 modules)
[next-auth][warn][NEXTAUTH_URL]
https://next-auth.js.org/warnings#nextauth_url
[next-auth][warn][NO_SECRET]
https://next-auth.js.org/warnings#no_secret
{ session: null }
✓ Compiled in 1920ms (603 modules)
{ session: null }
✓ Compiled /api/auth/[...nextauth]/route in 200ms (913 modules)
[next-auth][warn][NEXTAUTH_URL]
https://next-auth.js.org/warnings#nextauth_url
[next-auth][warn][NO_SECRET]
https://next-auth.js.org/warnings#no_secret Who am I?
I am a software engineer and I love web development.
I am not so young, unfortunately, I am a full stack developer because I don't want to leave nor backend neither frontend
I have worked as a software engineer for more than twenty years in product and consultancy companies.
I have the determination to be a reference as a Senior SDE on the Web |
It worked with your suggestion, Do I need webpack installed and a package? I think yes Thank you for your support |
yes i will have to release a patch to msnodesqlv8 but first i need to check it still works on linux and windows without nextjs |
Thank you, now I can continue to work. I had in my portfolio with app dir, it is very starnge. I did not get. |
You are incredible, support magic. With this next I started with next14 and I did not solve, it is strange. Even when I downgrade next.js I did not solve |
Hi msnodesqlv8,
There is still something wrong, I did not realize what I am missing. |
https://github.com/TimelordUK/todo-with-nextjs_msnodesqlv8 can you try this very simple application - i changed a demo to simply use msnodesqlv8 it works without any of the above at all if this works maybe can you use the same design, I am sorry I do not have the time to dig into your specific application see dbConnect.js and the index.js, [id].js for usage ready - started server on 0.0.0.0:3000, url: http://localhost:3000
event - compiled client and server successfully in 203 ms (125 modules)
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
wait - compiling / (client and server)...
event - compiled client and server successfully in 74 ms (163 modules)
wait - compiling /api/task...
event - compiled client and server successfully in 62 ms (174 modules)
[index] opening connection
select * from Task
[ { id: 3, completed: 0, task: 'new task update', _id: 3 } ]
[index] closing connection |
https://github.com/VittorioMorellini/portfolio14
This is my repo with msnodesqlv8 (4.1.1) and next 13.5.6
I am using node 18.18.2
I have this error in build, I am not able to understand, I used already this driver with Next.js 13 and I did not get errors.
Why is this error happening? There is no reason to happen.
The installation is going good, but the build is not working.
I have tried everything, delete node_modules and reinstall.
But the error still appears
I had prisma in this project before and I removed. This package for sql server does not compile
Vittorio Morellini
The text was updated successfully, but these errors were encountered: