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

Investigate the use of ESM modules #331

Open
rprieto opened this issue Mar 19, 2023 · 0 comments
Open

Investigate the use of ESM modules #331

rprieto opened this issue Mar 19, 2023 · 0 comments
Labels
dependencies Pull requests that update a dependency file

Comments

@rprieto
Copy link
Member

rprieto commented Mar 19, 2023

The following dependencies cannot be updated, because they switched to ESM:

  • url-join
  • chalk
  • boxen
Error [ERR_REQUIRE_ESM]: require() of ES Module node_modules/boxen/index.js from src/cli/messages.js not supported.
Instead change the require of index.js in src/cli/messages.js to a dynamic import() which is available in all CommonJS modules.

This might require the following change:

- const boxen = require('boxen')
+ import boxen from 'boxen'

And in package.json

{ 
   "type": "module",
 }

However we need to investigate the impact, e.g. if minimal version of Node, etc.

@rprieto rprieto added the dependencies Pull requests that update a dependency file label Mar 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

1 participant