-
Notifications
You must be signed in to change notification settings - Fork 34
Description
Issue description or question
Is this issue related to Quokka not outputting the expected results of your code?: Yes
My code runs as expected when executed with node (using experimental type stripping) but fails when run in Quokka. The error is:
Cannot access 'string' before initialization
In this context, string is a schema factory function imported from another package in the same monorepo. The imports are plain TypeScript files, not bundled or transpiled.
Sample code
// apps/ush/src/data/test.ts
import data from "./placeholder.scenario.json";
import { USHScenario } from "./scenario.ts"; // This line causes the error
console.log(USHScenario.validate(data));
console.log(data);
Sample repository link
This is inside of a monorepo that would require a lot of files to reproduce. I'm happy to do it if necessary but I would first want to know that it's not some other more obvious issue (e.g. Quokka does not support packages that export TypeScript)
Quokka.js Console Output
Cannot access 'string' before initialization
@ src/data/test.ts:2:1
Code editor version
Visual Studio Code v1.104.1
OS name and version
OSX 15.6.1