ich habe soweit mein Vue Server eingerichtet(Habe eine vorhandene Boilerplate etwas umgebaut) und habe aber jetzt das Problem, sobald ich was in meiner Clientside index Datei importieren möchte bekomme ich folgende Fehlermeldungen
JavaScript
import * as alt from 'alt-client';
import { WebViewEvents } from '../shared/webviewEvents';
//import './webview/index';
alt.log('Client-side has loaded!');
const F2_KEY = 113;
let view;
let isFocused = false;
export function focusWebView() {
if (isFocused) {
view.unfocus();
view.emit(WebViewEvents.toggleVisibility, false);
alt.showCursor(false);
alt.toggleGameControls(true);
native.triggerScreenblurFadeOut(100);
isFocused = false;
} else {
view.focus();
view.emit(WebViewEvents.toggleVisibility, true);
alt.showCursor(true);
alt.toggleGameControls(false);
native.triggerScreenblurFadeIn(100);
isFocused = true;
}
}
alt.on('connectionComplete', async ()=>{
if (view) {
focusWebView();
return;
}
alt.log("Test");
view = new alt.WebView('http://assets/webviews/index.html');
await new Promise((resolve)=>{
view.once('load', resolve);
});
focusWebView();
});
Alles anzeigen
Code
v8::Module::GetModuleNamespace: v8::Module::GetModuleNamespace must be used on an instantiated module
[V8] Unhandled promise rejection at gamemode-client:[unknown] (ReferenceError: No such module: ../shared/webviewEvents)
[V8] Exception at gamemode-client:<bootstrapper>:18
if(!alt.isWorker) __internal_start_file(mainPath);
ReferenceError: No such module: ../shared/webviewEvents
Failed to load resource gamemode-client