require() of ES Module right after init
garrettlove8 opened this issue · comments
Garrett commented
| Error Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/username/Development/website/.sst/platform/node_modules/string-width/index.js from /Users/username/Development/website/.sst/platform/node_modules/wide-align/align.js not supported.
| Instead change the require of index.js in /Users/username/Development/website/.sst/platform/node_modules/wide-align/align.js to a dynamic import() which is available in all CommonJS modules.
I encountered this error trying to run npm run dev --verbose
immediately after running sst init
. I realize this is a common error to encounter, but my expectation would be that sst init
will configure what needs to be configured such that this doesn't happen, or that the docs call it out and direct me to how to fix it.
Ryan Lee commented