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
I want a package.json that's pre-defined in my template directory.
This package.json specifies "type":"module"
But the init.config.ts script (or .js script) live in this same directory, and thus node picks up this configuration.
This means that I get an error about trying to use require() to load ESM modules:
Must use import to load ES Module: /Users/jwatte/github.com/reve-ai/reve-core/common/_templates/backend-service/init.config.ts
require() of ES modules is not supported.
require() of /Users/jwatte/github.com/reve-ai/reve-core/common/_templates/backend-service/init.config.ts from /Users/jwatte/github.com/reve-ai/reve-core/common/autoinstallers/rush-tools/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/rush-init-project-plugin/lib/logic/TemplateConfiguration.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 /Users/jwatte/github.com/reve-ai/reve-core/common/_templates/backend-service/package.json.
The text was updated successfully, but these errors were encountered:
To be a little more clear:
It's my template that has a package.json with "type":"module"
This template also has an init.config.js (or .ts)
Node then treats this as an ES module but the rush-plugins code is trying to load it with require().
I want a package.json that's pre-defined in my template directory.
This package.json specifies "type":"module"
But the init.config.ts script (or .js script) live in this same directory, and thus node picks up this configuration.
This means that I get an error about trying to use require() to load ESM modules:
The text was updated successfully, but these errors were encountered: