Jump to content

Recommended Posts

Posted (edited)

Hey guys,

I'm new to RageMP, but not new to NodeJS.

 

I build a construct with Typescript, compiled to JS for sure. 

Everytime i try to use a node module i get the Error above (Stack Trace below) . I checked 5 times, everything is installed. I even installed the packages globally.

May you can help me. In Vanilla NodeJS my code would work. I tried.

At First my TypeScript Code (proximity.ts). It will autocompiled to JS by PHPStorm with 'tsc' and a FileWatcher:

Spoiler

spacer.png

May you wonder what it looks like if it is compiled:

Spoiler

spacer.png

 

Here is my index.js Just requiring the compiled file.

Spoiler

spacer.png

Next, my Folder Structure. As you can see i'm working in Subdirectorys. The Code above is required in the Index.json of my roleplay package. It is loaded.

Spoiler

 

spacer.png

 

 

 

and last but not least: my Package.json.

Spoiler

spacer.png

I hope you can help me to solve this issue. I really don't know why RageMP is not loading my node modules. My there is kind of a Inside Tip or something like that. 

Thanks!

Oh i forgot. The Server Error and Stack Trace i get:

Spoiler

spacer.png

 

Edited by LordOfFailling

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...