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
Uncaught exception: Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: ./file.ts require() of ES modules is not supported. require() of ./main.ts from ./index.mjs is an ES module file as it is a .ts file whose nearest parent package.json contains "type": "module" which defines all .ts files in that package scope as ES modules.
Instead change the requiring code to use import(), or remove "type": "module" from ./package.json.
Steps to reproduce the problem
index.mjs
Actual Behavior
Uncaught exception: Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: ./file.ts require() of ES modules is not supported. require() of ./main.ts from ./index.mjs is an ES module file as it is a .ts file whose nearest parent package.json contains "type": "module" which defines all .ts files in that package scope as ES modules.
Instead change the requiring code to use import(), or remove "type": "module" from ./package.json.
Expected Behavior
There are no such error if start file from cmd
Specifications
The text was updated successfully, but these errors were encountered: