altmp/altv-js-module-v2

[Client] No such module: @altv/client

Closed this issue · 1 comments

Client Version: [20:14:02] alt:V build #16.0.0-dev.289, branch dev
Client OS: Linux (EndeavourOS/Arch)

Server Version: [20:08:56] alt:V Server 16.0.0-dev.289 (dev)
Server OS: Linux Debian Bullseye running in docker. Link to Image

Module Version: dev/0.0.0-dev.22

[20:15:54] Loading resource test
[20:15:54] [V8] Starting script client/index.js
[20:15:54][Error] [V8] v8::Module::GetModuleNamespace: v8::Module::GetModuleNamespace must be used on an instantiated module
[20:15:54][Error] [V8] Unhandled promise rejection at test:[unknown] (ReferenceError: No such module: @altv/client)
[20:15:54][Error] [V8] Exception at test:<bootstrapper>:18
[20:15:54][Error]   if(!alt.isWorker) __internal_start_file(mainPath);
[20:15:54][Error] ReferenceError: No such module: @altv/client
[20:15:54][Error] Failed to load resource test

Reproduction Ressource:
test.zip

Hey there, looking at the Docker Image you've provided it looks like you're not loading the JSv2 module required for the @altv/server / @altv/client module namespaces. I also cannot reproduce it using the latest downloadable version (dev/0.0.0-dev.22) on both, windows aswell as on Linux using non Dockerized alt:V server aswell as a Dockerized alt:V container.

I also found one issue in your resource.toml file:
You've set the client-type to be js where it should be jsv2

Infos on how to setup v2 module on client can be found here