Nibyc Posted December 1, 2021 Posted December 1, 2021 (edited) Hello there :), i need your help.Β i have a Problem with the compiling from typescript to Javascript.Β This is the Error:https://prnt.sc/21akv8o This is my folder structure. I want to compile my ts code to js with the structure which is defined in my developing folder π¦RPServer β£ πdeveloping β β£ πclient β β β£ πpackage β β β β£ πgui β β β β β£ πconnection β β β β β β£ πindex.ts β β β β β β πplayerConnected.ts β β β β βπindex.ts β β β βπindex.ts β β βπtsconfig.json β β£ πserver β£ πserver-files β β£ πclient_packages β β β£ πgui β β β β£ πconnection β β β β β£ πindex.js β β β β β πplayerConnected.js β β β βπindex.js β β βπindex.js β£ πpackage.json β πpackage-lock.json this is my tsconfig.json { "compilerOptions": { "strict": true, "baseUrl": "./", "target": "es2015", "module": "commonjs", "allowJs": true, "resolveJsonModule": true, "esModuleInterop": true, "removeComments": true, "noUnusedLocals": true, "noUnusedParameters": true, "types" : ["node", "ragemp-c"], "outDir": "../../server-files/client_packages/", }, "include": [ "**/*" ] } developing/client/package/gui/connection/playerConnected.ts mp.events.add('playerReady', () => { mp.gui.chat.push('Player connected!'); }); developing/client/package/gui/connection/index.ts import './playerConnected'; developing/client/package/gui/index.ts import'./connection/index'; developing/client/package/index.ts /** * Loaded on client initialization */ import './gui/index'; Β This is compiling to following code:Β server-files/client_packages/gui/connection/playerConnected.js "use strict"; mp.events.add('playerReady', () => { mp.gui.chat.push('Player connected!'); }); server-files/client_packages/gui/connection/index.js "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); require("./playerConnected"); server-files/client_packages/gui/index.js "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); require("./connection/index"); server-files/client_packages/index.js "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); require("./gui/index"); i really don't know what the Problem is.. i tried sereval things.. changed imports etc. but nothing works. If someone here knows whats the Problem please let me know Thanks alot!! Edited December 1, 2021 by Nibyc
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now