MelodyMaker
How to resolve an import statement in Deno
I can run node funcs fine with the Deno runtime. eg.... import { readFileSync } from 'node:fs'; I'm sure npm works fine, but my problem is more low-level than that. The multiple package.json's have to remain to support multiple subprojects and apps in a repo.
I enable/disable the deno extension to switch between node/deno runtime then switch the VSC debugger launch.json item.
Anyways I give up tinkering with Deno. It's a no-go for me. Maybe I'll looks at v2 when it comes out as it's supposed to have better support for workspaces. But I'm hardpressed to find any practical, real-world, metrics-based advantages to Deno over Node.
16 replies
How to resolve an import statement in Deno
Yes, I've been doing plenty of restarting extensions, deno servers, and VSC.
I got it working a little but there is a severe limitation. Deno is confused by there being more than one package.json within the project.
Even if the package.json file is empty (or empty curles {}) it fails.
If I delete the package.json or rename it---like for example, "package.jsonDISABLE"---, then it works.
16 replies
How to resolve an import statement in Deno
I've tried lots of variations, but essentially just have this in it...
{
"imports": {
"@root/": "./packages/"
}
}
I'm out of ideas. There is just no way to import a file into the Deno runtime. And the error messaging is unhelpful and irrelevant.
16 replies