Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support npm: specifiers #314

Closed
so1ve opened this issue Nov 15, 2022 · 16 comments
Closed

Support npm: specifiers #314

so1ve opened this issue Nov 15, 2022 · 16 comments
Assignees

Comments

@so1ve
Copy link

so1ve commented Nov 15, 2022

npm: specifiers are stable now, but Deno Deploy still doesn't support it.

@siygle
Copy link

siygle commented Dec 9, 2022

Any update on this issue?
Really want to use the npm compatibility on Deno Deploy directly, that's really helpful for dev. 🤞😃

@so1ve
Copy link
Author

so1ve commented Dec 13, 2022

Any update on this issue? Really want to use the npm compatibility on Deno Deploy directly, that's really helpful for dev. 🤞😃

The Deno blog mentions that npm: specifiers will be supported in the future:

https://deno.com/blog/npm-and-deno-anywhere

image

@dnk8n
Copy link

dnk8n commented Jan 21, 2023

I must say, from a fresh user (excuse the pun), this information wasn't obvious to me. Had I been forewarned, I would have avoided the route I ended up taking. Is it possible to make this caveat a bit more visible? What are the isolated issues that need to be closed in order to have this feature?

Looking for other ways to import package so that I can remain on deno deploy. Just when I thought I was done developing :(.

Is there not a way for a warning to appear during deno task start? One which cautions a user that if they are using deno deply, npm specifiers won't be able to be deployed?

@so1ve
Copy link
Author

so1ve commented Jan 21, 2023

Well, I think there is a workaround: if the deno bundle supports the npm: specifier, we can run the bundle locally and upload it afterwards

@bobmoff
Copy link

bobmoff commented Jan 22, 2023

I dont think the bundle/pack command supports npm specifiers yet 😢

denoland/deno#15960

@satyarohith
Copy link
Member

Status update: we are working towards supporting npm: specifiers in Deno Deploy and it's a priority for us, but it will take time and we don't have an ETA yet.

@nzoschke
Copy link

nzoschke commented Mar 4, 2023

Is there a way to work around this with import maps?

I have this error

The deployment failed: Module not found "npm:[email protected]".

I tried this import map but no luck:

{
  "imports": {
    "npm:protocol-buffers-schema": "https://esm.sh/[email protected]"
  }
}

@vixalien
Copy link

@nzoschke I think you would have to do

{
  "imports": {
    "npm:[email protected]": "https://esm.sh/protocol-buffers-schema"
  }
}

@Roosteridk
Copy link

any update on this?

@vixalien
Copy link

any update on this?

I think they just announced npm: specifiers in deno compile as beta, so I hope the next step will be deploy

@MarkBennett
Copy link

any update on this?

I think they just announced npm: specifiers in deno compile as beta, so I hope the next step will be deploy

Perhaps this is what you're referring to @vixalien? Looks like you might be right that support in deno compile is coming, so hopefully support on Deno Deploy won't be far behind!

@so1ve
Copy link
Author

so1ve commented May 26, 2023

Update: Deno Deploy supports node builtins now!

https://deno.com/blog/node-builtins-on-deploy

@vixalien
Copy link

vixalien commented May 26, 2023

seems it's just node: specifiers and NOT npm: specifiers.

We are working to bring npm specifiers support natively to Deno Deploy. Stay tuned for updates on this soon.

@so1ve
Copy link
Author

so1ve commented May 26, 2023

seems it's just node: specifiers and NOT npm: specifiers.

Yes you are right, but node specifiers are already supported, will npm be far away? :)

@rlee1990
Copy link

Are there any new updates on this?

@lucacasonato
Copy link
Member

It's finally here.
NPM support on Deno Deploy.
Import over 2 million NPM modules from the edge.

💥

https://deno.com/blog/npm-on-deno-deploy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests