Open gnpivo opened 1 year ago
do you have rust package installed?
Hi @raedrizqie 😄 I just installed the mingw-w64-rust package and tried running the commands again. Sadly, the same output occurred. 😞 I didn't have the Rust package before.
i think it is because rust binding is not enabled on nodejs
that does sound likely.
Would this be an issue on my end, or would it be an issue with the build configuration of the package?
this is a problem with the configuration on this end but you have to understand getting nodejs to build and work with mingw-w64 was quite an undertaking in itself, i just think it sorta went in to the TODO section at some point :). we can try enabling it but there is no guarantee it will work out of the box, a good deal of the nodejs functionality was only recently fixed.
looks like N-API is not an official part of nodejs and might need to be ported first, nodejs itself has no rust bindings.
I'm looking into this. I'll post updates/ask questions here when there's progress.
@revelator At first glance, I'm having trouble understanding what would need to be ported in order for this to happen. (I'm comparing with what arch does in the hope to find what we are missing here.) Could you point me somewhere to start looking?
been a while since i looked at anything due to health problems. i dont think the problem is located in our nodejs package itself, it might just be the N-api package that needs some adjustment but i cant find that one in the arch repository so im not sure they ever ported it ?.
ah it was renamed Node-API and it is a part of nodejs now... hmm gotta find out where in it things go wrong then.
Ah I see. That makes sense! I hope you feel better now! Anyway, please let me know if there's anything I can help with!
sadly no, i broke my back in two places around 15 years ago now, it took them 10 years to figure out it was broken though and in the meantime my nerve connections got all messed up. So i have two metal implants + 8 large screws in my back now :S and there has been some complications. Ill see if i can figure somehing out but it might take a while cause i cant sit for very long anymore.
there is an option enable_rust
or simething like that, when building nodejs.. but i dont know if it will make any difference at all.. i will try it later
sadly no, i broke my back in two places around 15 years ago now, it took them 10 years to figure out it was broken though and in the meantime my nerve connections got all messed up. So i have two metal implants + 8 large screws in my back now :S and there has been some complications. Ill see if i can figure somehing out but it might take a while cause i cant sit for very long anymore.
I'm sorry to hear that. Please, do prioritize your health above all things.
i will though ive not much choice in the matter anyway :) but if i have a good day ill see if i can figure something out.
@gnpivo i think we need to compile nextjs from source.. do you know what are the steps?
if we use npx, it will download the prebuilt node module of swc.win32-x64-msvc.node
and try to use it, which is not compatible for mingw env..
so, imo, either you ask them to provide swc.win32-x64-gnu.node
or you must compile your own
yeah it would need portage the msvc model will not work with mingw-w64. might not be a big problem creating a port so asking them would make sense.
they could use our patchset for nodejs as a template i believe, that might make things easier for them.
I'm having the same behaviour on MSYS2 UCRT64, with npx create-next-app
version 14.2.3, node
version 21.7.2
thread '<unnamed>' panicked at \.cargo\registry\src\index.crates.io-6f17d22bba15001f\napi-sys-2.3.0\src\functions.rs:7:3:
Must load N-API bindings
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Any news regarding this issue ?
duplicate of #20407 (actually this is the original, but I didn't see it the first time)
Description / Steps to reproduce the issue
Hi! I am using the mingw-w64-nodejs package for Node.js development. Unfortunately, I can't run the development servers for my Next.js apps. I believe this is a bug because the apps run fine when I use my system's Node.js, but they don't run when I use the MSYS2 version. For both versions,
node --version
returns v18.16.1.Here are some steps to recreate the issue I am experiencing:
npx create-next-app@latest next-app
create-next-app
and select the default optionscd next-app
npm run dev
(You can then run
npm uninstall -g create-next-app
to uninstall thecreate-next-app
tool.)Expected behavior
I expected the command
npm run dev
to run the development server athttp://localhost:3000
and produce output similar to that produced by my system's Node.js.The output should look something like this:
Actual behavior
Running
npm run dev
produces the following output:The server does not run.
Verification
Windows Version
MINGW64_NT-10.0-19045
MINGW environments affected
Are you willing to submit a PR?
I would love to contribute, but I don't know how to fix the issue.