DenoDDeno
Powered by
BhauminB
Denoβ€’2y agoβ€’
4 replies
Bhaumin

Import built-in Node module from deno.json imports

How can we import built-in Node modules by adding imorts to deno.json?
We are getting below error when we do it

error: Relative import path "url" not prefixed with / or ./ or ../
If you want to use a built-in Node module, add a "node:" prefix (ex. "node:url").
error: Relative import path "url" not prefixed with / or ./ or ../
If you want to use a built-in Node module, add a "node:" prefix (ex. "node:url").


But we have added "url/*": "node:url" to our deno.json imports.
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,944Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

GitHub imports from package.json in Deno
phocks_testPphocks_test / help
16mo ago
Cache imports in deno.json
NebulaRhythmNNebulaRhythm / help
3y ago
Deno Deploy JSON import
CovaCCova / help
3y ago
How to import `deno.json`/`jsr` based module directly from github?
dman-osDdman-os / help
2y ago