blues-stack icon indicating copy to clipboard operation
blues-stack copied to clipboard

Install an esm package dependency

Open github-mathieu-salles opened this issue 1 year ago • 2 comments

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

github-mathieu-salles avatar Jan 29 '24 22:01 github-mathieu-salles