I started rewriting an npwd's working app server.lua to server.ts. I don't know what I miss to be able to use onMessage export (see https://projecterror.dev/docs/npwd/api/server-exports/ the Lua and JS code are almost the same).
As on the server-exports page I don't have much code, but when I hit F12 on "exports" (in VS Code) it browses to @citizenfx/server so what do I miss to install or configure?
import { oxmysql as MySQL } from '@overextended/oxmysql';
import { OnMessageExportCtx } from '@npwd/types';
const ESX = exports['es_extended'].getSharedObject();
console.log('Server started.');
exports.npwd.onMessage(value.num, (ctx: OnMessageExportCtx) => {
console.log(ctx);
}));
Development Issue
Unsure
Phone Version
master
Issue Description
I started rewriting an npwd's working app
server.lua
toserver.ts
. I don't know what I miss to be able to useonMessage
export (see https://projecterror.dev/docs/npwd/api/server-exports/ the Lua and JS code are almost the same).I also read the FAQ (https://projecterror.dev/docs/npwd/faq/#errors) and have
useResourceIntegration
set to true.As on the server-exports page I don't have much code, but when I hit F12 on "exports" (in VS Code) it browses to
@citizenfx/server
so what do I miss to install or configure?Thanks a lot.
Issue Reproduction
npm install --save-dev
)server.ts
code as describedEvidence
No response