10 ms·
Deno 1.34: Deno compile supports NPM packages
- Etheryte 3y agoI'm very happy with the direction Deno is taking in its development. At the same time, I'm not sure when I would feel comfortable deploying something to production with it. Is anyone here running Deno in production?
- tmikaeld 3y agoWhy wouldn't you be comfortable with running it in production? Just don't use the parts labeled as "experimental" or "beta" and it's very production-ready and stable.
- yCombLinks 3y agoBecause things like adoption and longevity of a project correlate with it not being abandoned, etc. Dealing with abandoned tech in your stack sucks
- chrisabrams 3y agoI have a small Deno powered bot that generates Shopify listings from some inputs. It’s been running for a few months with no crashes or restarts. I think it really comes down to what APIs or packages you need. I have had trouble with projects such as Prisma and wouldn’t do that in production as the generated output is slightly different for some reason (haven’t had time to inspect).
- quentinadam 3y agoWe run a medium sized trading system (20 microservices) in Deno for about a year now. There have been a few runtime quirks but they have currently all been ironed out. I love the approach that Deno takes with respect to permissions which allows you to strictly specify which urls your program can access, which files/directories can be read/written, etc.
- Onavo 3y agoHow are JS's scientific computing and stats libraries?
- revskill 3y agoPython.js ?
- vorticalbox 3y agoThere is brain.js and tensorflow.js. It's not anywhere near python
- davnicwil 3y agoYou are most likely aware but just to point out, Node now also has a version of the permissions features [0] (not sure on parity but it was obviously deno inspired) behind an experimental flag! [0] https://nodejs.org/api/permissions.html https://nodejs.org/api/permissions.html
- lytedev 3y agoWe have also run it in production for about a year, but it's a tiny metrics collector and doesn't do anything fancy at all. But writing and deploying it end to end was a fantastic and quick experience.
- qbasic_forever 3y agoIt's still just V8 under the hood so IMHO it's not nearly as risky as if someone just wrote their own bespoke JS interpretor. And everything around V8 is in rust so there's less chance of catastrophic footguns and crashes (still non-zero, but way more trustworthy than a new C/C++ project). IMHO the biggest risks would be misunderstanding of capabilities/configuration particularly around its stricter sandboxing, i.e. forgetting it won't let you access file system or network by default and your testing failing to capture some dependency there.
- msoad 3y agoWith all of this Node compatibility work it should be able to run Next.je at this point. I wonder what fails when one tries to do that?
- bartlomieju 3y agoBartek from the Deno team here. We're currently missing polyfills for IPC module to be able to use `next dev` command.
- borplk 3y agoCan anyone comment on the experience with the feature of producing a single binary? Is it really a standalone binary with all the NPM libraries and everything without needing anything else from the host machine? For example can I ship a self-contained server with it that carries its own html/css/js?
- mindbyte 3y agoYes, until the html/css/js part. There is a tool that puts all your files into an js object and provides your files like a virtual file system. Obviously doesn't go well with bigger files. I wish there was a way to use PE's / ELF's existing ways to embed files, especially for memory usage reasons.
- DrinkWater 3y agoProducing an SBOM would be a very nice feature to add to this.
- jensneuse 3y agoDeno is becoming more and more useful, but at the same time it feels like the project moves further and further away from the initial presentation of ry.
- Already__Taken 3y agoone of the main take aways I got from Ryan's deno intro was pragmatism over preferences.
- lolinder 3y agoAre we talking about the same talk? 10 Things I Regret about Node.js [0]? Goal #2 (after security) was to simplify the module system, and the very first thing he said about that was no node compatibility. [0] https://www.youtube.com/watch?v=M3BM9TB-8yA https://www.youtube.com/watch?v=M3BM9TB-8yA
- jitl 3y agoSupporting NPM allows the entire ecosystem to gradually migrate from CommonJS/NPM packages to ESM/Deno imports. New developers in Deno will still write pure code - not NPM code that has slow require; they don’t bear any mental complexity - it’s only legacy code that pays a runtime complexity cost.
- 8K832d7tNmiQ 3y agoanother perspective is that you can gradually move away your project dependencies into deno while still using node modules.
- lolinder 3y agoIn practice that's not going to happen, though. People will add their npm dependencies and move on, and instead of solving JS dependency hell Deno will become a layer of abstraction on top of it. A lot of us were hoping Deno would do the Gopher thing and force a complete reset. Yes, that means less/slower adoption, but it means that when you pick up a Deno library you know you're not getting all of npm with it. The further we move along the less likely it seems that any Deno project will be able to be npm-free.
- BraverHeart 3y agoIsn't one of the main selling points of Deno is the new package management system, wouldn't supporting NPM effectively nullify the benefits? Will there be a strategy to avoid NPM ultimately becoming the defacto package manager for Deno
- throwaway2990 3y agoSure. But no one wants to use deno cos there’s no packages. And so there’s no benefits over npm. No one wants to link to random GitHub files.
- sieabahlpark 3y ago[dead]
- lytedev 3y agoI like Deno. The benefits to me are largely around developer experience and tooling. I much prefer Deno's dependency management solution to Node's. Additionally, lots of packages have made their codebase more runtime agnostic as a result of Deno existing, so there definitely are Deno packages out there. It just depends onw hat you're building!
- taink 3y agoKeep in mind there is no complete feature parity with NPM. This only allows you to use packages not present in Deno's ecosystem, but it does not guarantee it will work flawlessly (and in practice it can be a pain to use some packages). The best way to use Deno and take advantage of its benefits is to use Deno's packages. Allowing NPM packages is a good strategic move because on top of already being quite different from Node, there are not many packages, but it does not take away from how well it will work with Deno-native packages.
- azangru 3y agoI wonder if deno will ever converge with node the way io.js did.
- hnbad 3y agoThere are apparently plans to add a deno-style permission system to Node (I think there is experimental support behind a flag in one of the recent builds) but I don't think it will become the default the way deno does it, at least not in the foreseeable future.
- davnicwil 3y agoI put this in another comment also but yeah, the permissions feature is documented here https://nodejs.org/api/permissions.html https://nodejs.org/api/permissions.html It definitely seems that Node is surfing in deno's wake here and taking heavy inspiration from some of the more successful features. I guess remains to be seen if this will follow in something like the Java / Scala / Kotlin model or if it'll lead to more of a merge a la io.js - I tend to think that a merge fits better since we're dealing with runtimes and not separate languages, but I think the former model could work too. Either way, great thing for the ecosystem!
- vmfunction 3y agounless node convert to Rust, the future is Deno or rust based approach. The main reason to NOT use node is the who C backend.
- frou_dh 3y agoNot really, because it's not a fork and is written in a different language.
- dazhbog 3y agoCan it compile native modules like serialport into an executable? or am I dreaming too much?
- bartlomieju 3y agoThese modules can be included but currently there's no way to use them - that's because they need to be present on disk to load them as dynamic libraries. We're debating how to best tackle that. If you have a specific use case in mind I would appreciate opening a feature request in our issue tracker.
- tsu_tsu 3y agoDoes this mean we can use npm packages with Deno Deploy? Or is that another issue?
- bartlomieju 3y agoIt's another issue, but it's close
- tiborsaas 3y agoThat's super exciting, can't wait to test it.
- rafaelturk 3y agoWhy I should use Deno?
- Kuinox 3y agoIt's hype, you need another reason?
- StefanWestfal 3y agoFor me it is convenience as tooling like fmt, testing, etc. are build in and they try to keep api close to browser api's when possible.
- Cthulhu_ 3y agoI've no usage experience myself, but, I'd say running (and now packaging or compiling) modern JS or Typescript directly without having to build a pipeline with tools like webpack.
- wk_end 3y agoI don't think Deno's gonna help deal with something like Webpack, is it? Webpack's for building browser bundles, Deno's about running TypeScript server-side, isn't it?
- _joel 3y agoAs an admin and not a dev, why would this be beneficial to me, managing a fairly standard app and node/yarn frontend? Sell it to me :)
- lytedev 3y agoFor an admin, I'm not sure. The deployment and CI/CD story may be cleaner? The real win to me is the developer experience. Deno comes with everything: test runner, linter, typescript, language server, etc. That's the winner for me.
- _joel 3y agoCheers, I worded that badly I suppose but you answered the question I meant :)
- satyarohith 3y agoDisclosure: I work at Deno For example, if you use Deno first frameworks like fresh and use Deno Deploy, you’re eliminating build steps. You git push and the application is live across the world in 1-2 seconds. It feels like magic.
- simultsop 3y agoHonestly it would feel magic back in 2009. Currently there are huge waves of changes. Everyone trying to offer utopian ecosystem. If the tendency is to gather community, it seems they need to chase companies given that many have somewhat stable stacks. Reshaping existing projects requires way more sacrifices. For example the major shift of Vue 2 to Vue 3, disrupted entire plugins ecosystem for Vue 2. People barely get motivated rewriting same thing for sake of composition api while options API remained. Idk exact reasoning, but there is a huge tech debt on Vue 2 plugin ecosystem. So again sacrifices, sacrifices.
- stevemethiew 3y ago[dead]
- apatheticonion 3y agoHonestly I don't have an issue with Node's approach to module resolution - especially when combined with a package mangers like pnpm that symlink dependencies. Multi project workspaces are easy to manage with pnpm and publishing to an npm registry is fine enough. I thought about git as a package distribution mechanism (like Go) but it adds complexity in how you handle transpilation for releases and I'm not sure how versioning works in the context of multi-package projects/workspaces (how does Go do it?). I just want to use TypeScript on the back end without a billion years of setup.