Weird issue when Importing Jecs

I am using @rbxts/jecs and I am having a weird issue. For some reason why I import it, the compiled result is "jecs.lua" instead of just "jecs". Error:
Infinite yield possible on '[email protected]:WaitForChild("jecs.luau")' - Studio
12:24:51.680 Stack Begin - Studio
12:24:51.680 Script 'ReplicatedStorage.rbxts_include.RuntimeLib', Line 53 - function import - Studio - RuntimeLib:53
12:24:51.680 Script 'ServerScriptService.TS.Actor.ecs.world', Line 14 - Studio - world:14
12:24:51.680 Stack End
Infinite yield possible on '[email protected]:WaitForChild("jecs.luau")' - Studio
12:24:51.680 Stack Begin - Studio
12:24:51.680 Script 'ReplicatedStorage.rbxts_include.RuntimeLib', Line 53 - function import - Studio - RuntimeLib:53
12:24:51.680 Script 'ServerScriptService.TS.Actor.ecs.world', Line 14 - Studio - world:14
12:24:51.680 Stack End
My TS:
import { World } from "@rbxts/jecs";
import { World } from "@rbxts/jecs";
Compiled:
local World = TS.import(script, game:GetService("ReplicatedStorage"), "rbxts_include", "node_modules", "@rbxts", "jecs", "jecs.luau").World
local World = TS.import(script, game:GetService("ReplicatedStorage"), "rbxts_include", "node_modules", "@rbxts", "jecs", "jecs.luau").World
What can I do to fix this?
22 Replies
wAD
wAD4mo ago
upgrade roblox-ts
Braden
BradenOP4mo ago
upgrading from 2.3.0 to 3.0.0 causes 600+ errors mostly in UI. I am using @rbxts/react
src/client/uiComponents/main-menu/base-navigation.tsx:36:4 - error TS2322: Type '{ children: Node[]; shouldRender: boolean; unmountDelay: number; }' is not assignable to type 'DelayRenderProps'.
Types of property 'children' are incompatible.
Type 'Node[]' is not assignable to type 'ReactNode'.
Type 'Node[]' is not assignable to type '{ readonly [key: string]: ReactNode; readonly [key: number]: ReactNode; }'.
Index signature for type 'string' is missing in type 'Node[]'.

36 <DelayRender shouldRender={visible} unmountDelay={1}>
src/client/uiComponents/main-menu/base-navigation.tsx:36:4 - error TS2322: Type '{ children: Node[]; shouldRender: boolean; unmountDelay: number; }' is not assignable to type 'DelayRenderProps'.
Types of property 'children' are incompatible.
Type 'Node[]' is not assignable to type 'ReactNode'.
Type 'Node[]' is not assignable to type '{ readonly [key: string]: ReactNode; readonly [key: number]: ReactNode; }'.
Index signature for type 'string' is missing in type 'Node[]'.

36 <DelayRender shouldRender={visible} unmountDelay={1}>
wAD
wAD4mo ago
you can't be using @rbxts/react it's not compatible with 2.3.0
Braden
BradenOP4mo ago
2.3.0-dev-576ad98 specifically
wAD
wAD4mo ago
the error shouldn't be something related to roblox-ts upgrade how are you defining that props interface
Braden
BradenOP4mo ago
import React, { useEffect, useState } from "@rbxts/react";

interface DelayRenderProps extends React.PropsWithChildren {
shouldRender: boolean;
mountDelay?: number;
unmountDelay?: number;
}
import React, { useEffect, useState } from "@rbxts/react";

interface DelayRenderProps extends React.PropsWithChildren {
shouldRender: boolean;
mountDelay?: number;
unmountDelay?: number;
}
seems that jsx is making arrays of Nodes while now react is expecting ReactNode hmmm, it appears @rbxts/jabby is referencing roact, removing the package fixes the issue is there a way arround that, or is jabby roact only?
wAD
wAD4mo ago
do npm ls @rbxts/roact can you show a screenshot
Braden
BradenOP4mo ago
No description
Braden
BradenOP4mo ago
Seems that removing @rbxts/jabby and then reinstalling made it work very strange
wAD
wAD4mo ago
probably outdated
Braden
BradenOP4mo ago
thanks for the help!
wAD
wAD4mo ago
from what i know jabby uses vide
Braden
BradenOP4mo ago
i just installed it today, which is weird
wAD
wAD4mo ago
also from what i know you're going to get hell of a ton compiler errors in a couple of minutes
Braden
BradenOP4mo ago
how so?
wAD
wAD4mo ago
i don't know if this was patched, but if it installs vide in your project as a non-direct dependency you're cooked https://discord.com/channels/476080952636997633/476080952636997635/1334381197157077053
Braden
BradenOP4mo ago
vide is not in package json yet, so maybe it was fixed?
PepeElToro41
PepeElToro414mo ago
vide is a dependency for jabby so it installed it you need to patch vide by deleting the d.ts file
Braden
BradenOP4mo ago
deleting d.ts results in this error:
error TS2688: Cannot find type definition file for 'vide'.
The file is in the program because:
Entry point for implicit type library 'vide'
error TS2688: Cannot find type definition file for 'vide'.
The file is in the program because:
Entry point for implicit type library 'vide'
cant compile anymore
PepeElToro41
PepeElToro414mo ago
alright, I hoped this would work then you should only delete the declare global part of it
Braden
BradenOP4mo ago
seems to have fixed the issue, thanks!
PepeElToro41
PepeElToro414mo ago
make sure you use patch-package otherwise its gonna overwrite it when npm installs something

Did you find this page helpful?