You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like on Friday he started updating some of the less popular of his 1000+ NPM packages to be ESM only. As such, Nx Node builds no longer work with his ESM-only modules:
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module...
require() of ES modules is not supported.
require() of ...is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Who is Sindre Sorhus and why should you care? I promise you are using, either directly or indirectly, something he wrote:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I suspect this is going to cause a stir in the Node tooling community, including Nx:
https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
Looks like on Friday he started updating some of the less popular of his 1000+ NPM packages to be ESM only. As such, Nx Node builds no longer work with his ESM-only modules:
Who is Sindre Sorhus and why should you care? I promise you are using, either directly or indirectly, something he wrote:
https://www.npmjs.com/search?q=author%3Asindresorhus&ranking=popularity
This is not an Nx problem per se, but with how Nx uses Webpack 4, ES5 and CJS modules. Regardless it almost certainly is going to affect Nx users.
Beta Was this translation helpful? Give feedback.
All reactions