Get the latest tech news

NPM and NodeJS should do more to make ES Modules easy to use


Coming back to JavaScript and TypeScript after a few years neck deep in Python and Hack, I kept hitting a number of new, cryptic errors when running NodeJS code in my dev environment:

Coming back to JavaScript and TypeScript after a few years neck deep in Python and Hack, I kept hitting a number of new, cryptic errors when running NodeJS code in my dev environment: A number of solutions sprang up around ways to declare and load modules: IIFEs, LabJS, AMD, require.js, TypeScript namespaces, and more. We should upgrade the most common libraries used by the community to ES Modules, either manually or through automated pull requests (this feels like something that can be semi-automated).

Get the Android app

Or read this on Hacker News

Read more on:

Photo of npm

npm

Photo of ES Modules

ES Modules

Photo of NodeJS

NodeJS

Related news:

News photo

NPM package is-even has over 140k weekly downloads

News photo

NPM Users Download 2.1B Deprecated Packages Weekly, Say Security Researchers

News photo

SSH keys stolen by stream of malicious PyPI and npm packages