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
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /node_modules/terminal-image/index.js
require() of ES modules is not supported.
require() of /node_modules/terminal-image/index.js from /src/cli/commands/new/newCommand.ts 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.
Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /node_modules/terminal-image/package.json.
at new NodeError (node:internal/errors:363:5)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1112:13)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:816:12)
at Module.require (node:internal/modules/cjs/loader:999:19)
at require (node:internal/modules/cjs/helpers:93:18)
at Object.<anonymous> (/src/cli/commands/new/newCommand.ts:10:1)
at Module._compile (node:internal/modules/cjs/loader:1095:14)
at Module.m._compile (/ts-node/src/index.ts:1295:23)
at Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The text was updated successfully, but these errors were encountered:
When I run with ts-node I have next error
The text was updated successfully, but these errors were encountered: