#Trying to learn vscode and rojo but running into a problem

1 messages · Page 1 of 1 (latest)

split merlin
#

Im trying to use the roblox require function in a script but get the error "TypeError: unkown require" in vs code with selene. But in roblox studio it works wonders. Is there a way to make selene understand what modules/folders exist in my project? Bit of a newbie to lua and roblox so it might even understand what im trying to ask.

stark moss
#

?

split merlin
#

so the "path" game.ReplicatedStorage.Packages.Networker.client works without errors in roblox studio. But in vscode i get a error, that it doesnt recognize my folders and or the client ModuleScript

split merlin
#

thank you, do i need a addons for the .luaurc to work?

#

Ok. Cause i was watching a tutorial of a guy setting up rojo and vscode, but he was able to require basically anything he wanted without having to setup paths. There is no rokit addon that might automatically do this?

#

this is my file structure

wintry goblet
#

I just totally lied to you. This is for building Luau only projects

#

Rojo's default.project.json will help resolve Roblox paths to the files in your project

#

You can continue to use aliases, but you'll have to write in the Roblox paths

#

Relative pathing still works, but again, must be written in Roblox paths

split merlin
#

cause in default.project.json i have defined Packages, do i also need to define the path in sourcemap?

heavy depotBOT
#

studio** You are now Level 1! **studio

split merlin
#

this is my default.project.json

wintry goblet
#

Yep. That's valid

#

Your path is incorrect though

#

You meant to write: game.ReplicatedStorage.Packages.Networker.Generated.client

split merlin
#

oh yeah ty, but now instead i get the error

#

And even in i create a test module in Shared like you did in your first image, i get the same error.

#

jesus christ i just restarted vs code as an admin and it worked flawlessy