microsoft / microsoft/node-api-dotnet
panic trying to load Vite.createServer()
@vmoroz ci sta già lavorando.
Dal 14/3/2025.
- Lingua principale
- C#
- Stelle
- 783
- Fork
- 80
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Getting a panic trying to use RunAsync to import and invoke a JS method from a C# app using EmbeddingThreadRuntime/etc.
This is using the main branch as of today. The libnode itself was built by me.
thread '<unnamed>' panicked at C:\Users\runneradmin/.cargo\registry\src\index.crates.io-6f17d22bba15001f\napi-sys-2.4.0\src\functions.rs:7:3:
Node-API symbol has not been loaded
stack backtrace:
0: 0x7ffcfa4265ec - napi_register_module_v1
1: 0x7ffcfa3b9d9a - <unknown>
2: 0x7ffcfa41d587 - napi_register_module_v1
3: 0x7ffcfa427864 - napi_register_module_v1
4: 0x7ffcfa427d71 - napi_register_module_v1
5: 0x7ffcfa427912 - napi_register_module_v1
6: 0x7ffcfa42789f - napi_register_module_v1
7: 0x7ffcfa42788e - napi_register_module_v1
8: 0x7ffcfa5fc091 - napi_register_module_v1
9: 0x7ffcfa3d363b - napi_register_module_v1
10: 0x7ffcfa3d35d7 - napi_register_module_v1
The problem is specifically limited to Vite.createServer right now. I can't figure out what it does internally to cause this. But my suspicion, thought I can't yet prove it, is that it loads a module which loads a module which loads a native module, which fails. Since I don't understand what's happening enough I haven't been able to create a reproduction.
Some enlightenment about what to look at may be useful. Is this a crash on the node side, because it's doing something truly awful, or is it some interaction with NodeAPI?
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Valutazione
Questa issue non è ancora stata valutata.