-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
npm specifiers roadmap #15960
Comments
FYI, you may also try |
@loynoir off-topic, but I'd like to mention that esm.sh is developed by a Deno team member. Better support for npm specifiers is going to eliminate the need to resort to third-party solutions like such. |
Just a question regarding |
@deckchairlabs let's discuss in #16089 -- probably returns the cached path |
Is there any plan to support directly running code meant for node? For example, I'm trying to run |
Any reason why https://github.com/denoland/deno/blob/main/cli/npm/cache.rs#L222 isn't being tracked here? |
@tuhanayim I added it just now. Curious what package you ran into that wasn't all lowercase? |
@dsherret |
Ok, it's because of a module named JSONStream. Dependency flow: |
When I using bitcoinjs-lib and bip32 with deno npm specifiers. (Skipped some code, only showing the related) import bitcoin from 'npm:bitcoinjs-lib'
import { BIP32Factory as bip32 } from 'npm:bip32'
import bip39 from 'npm:bip39'
import * as ecc from 'npm:tiny-secp256k1'
let mnemonic = 'mnemonic'
let seed = bip39.mnemonicToSeedSync(mnemonic)
let root = bip32(ecc).fromSeed(seed) This code throw error from fromSeed() function which is using hmac SHA512 Because of this, I can't using bitcoinjs-lib with deno. |
Is there any work planned for the task |
@Bzvwf16WSDKoSZd8 there is an open issue here denoland/std#2557 also there is #16107
@MarkBennett not at the moment. That would mean supporting applications written with CommonJS in Deno and having Node globals, which we want to avoid. It would be ideal for Deno to remain ESM only. We probably will support specifiers like
@oscarotero would you be able to open an issue for this one? Sounds like there's a pain point here. Thanks. |
@dsherret I agree. To maintain consistency with the browser code, Deno should only keep the ESM. |
@tuhanayim non-all lowercase package name support will be in 1.28.1 (releasing later today) #16669 |
That was quick! Thanks 🙏 |
Is compatibility with NextJS planned / being tracked? |
@cmoog that's something we're looking into, but I recommend opening an issue about anything not working. |
If anyone has a question or issue with npm compatibility I recommend opening an issue so that we can track everything individually within issues. That also helps make everything more searchable for others. Going to lock this issue to encourage that. |
Going to close this one as it doesn't seem worth tracking anymore. |
@types
package for type checking #20455deno compile
support (deno compile
cannot resolve npm modules #16632)deno vendor
support (feat(vendor): support for npm specifiers #19186)JSON
vsjson
) (1.28.1)deno install
support (1.28.1)@deno-types
support--reload=npm:
support feat(npm): add support for --reload=npm: and --reload=npm:<package> #15972deno cache npm:<package>
(feat(unstable): add support for npm specifier cli arguments for 'deno cache' #16141)deno pack
(prev. bundle) supportThe text was updated successfully, but these errors were encountered: