Skip to content

What happens if I don't use the "npm:" import specifier when importing from npm? #27344

Answered by bartlomieju
MoInnovates asked this question in Q&A
Discussion options

You must be logged in to vote

Deno looks for deno.json and package.json files in you CWD and up the parent directory tree. If it finds either (or both) of these files it will use imports and dependencies mappings to figure out what's the import, you can read more about it here: https://docs.deno.com/runtime/fundamentals/modules/

Also what happens when the package is using some unsupported API, will Deno give me an error at startup, or will it be later at runtime?

It will error when a function that is unsupported is used, so at runtime.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MoInnovates
Comment options

Answer selected by MoInnovates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants