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

Install an esm package dependency #231

Open
github-mathieu-salles opened this issue Jan 29, 2024 · 2 comments
Open

Install an esm package dependency #231

github-mathieu-salles opened this issue Jan 29, 2024 · 2 comments

Comments

@github-mathieu-salles
Copy link

Have you experienced this bug with the latest version of the template?

yes

Steps to Reproduce

  • Create a project using this template
  • Try to install an esm package (I used mine but also this one to be sure)

Expected Behavior

Being able to use an esm package to my project

Actual Behavior

I'm getting this error

error /Users/.../node_modules/cypress: Command failed. Exit code: 1 Command: node index.js --exec install Arguments: Directory: /Users/.../node_modules/cypress Output: /Users/.../node_modules/cli-truncate/index.js:3 const stringWidth = require('string-width');
^

Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/.../node_modules/string-width/index.js from /Users/.../node_modules/cli-truncate/index.js not supported. Instead change the require of /Users/.../node_modules/string-width/index.js in /Users/.../node_modules/cli-truncate/index.js to a dynamic import() which is available in all CommonJS modules. at Object.<anonymous> (/Users/.../node_modules/cli-truncate/index.js:3:21) at Object.<anonymous> (/Users/.../node_modules/listr2/dist/renderer/default.renderer.js:4:21) { code: 'ERR_REQUIRE_ESM'

I tried to make the modification from this PR but without success. I might forget something 🤔
I can install these packages without problem to a project using remix without the template if it helps

@1willcobb
Copy link

I am also having tons of esm issues with @mdx-js/mdx. Cant get it to run.

@MichaelDeBoey
Copy link
Member

These will probably be solved once #206 is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants