Jump to content

Nibyc

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Nibyc

  1. 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!!
  2. 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!!
×
×
  • Create New...