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
Hi, I'm kind of a typescript beginner also coming from the PHP/Symfony world.
Got the following error:
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /home/jirka/projects/page-scraper/src/openai/ClientFactory.ts
require() of ES modules is not supported.
require() of /home/jirka/projects/page-scraper/src/openai/ClientFactory.ts from /home/jirka/projects/page-scraper/node_modules/node-dependency-injection/dist/lib/Loader/FileLoader.js 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 /home/jirka/projects/page-scraper/package.json.
Hi, I'm kind of a typescript beginner also coming from the PHP/Symfony world.
Got the following error:
I have
"type": "module"
set in package.jsonMy tsconfig.json
services.yaml
Typescript: 5.0.3
running a .ts script using
nodemon --experimental-specifier-resolution=node ./src/index.ts
Thanks for your help
The text was updated successfully, but these errors were encountered: