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
Seems to be unable to load ESM for a local plugin.
To Reproduce
Create a file at .auto/plugins/test.ts
add console.log('Works') in tests.ts file
In .autorc, do the following
{
"plugins": [
... // other plugins
"./.auto/plugins/test.ts"
],
// other config
}
Run yarn auto shipit -d
output:
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Users/tlkiong/Desktop/work/test/.auto/plugins/test.ts
require() of ES modules is not supported.
require() of /Users/tlkiong/Desktop/work/test/.auto/plugins/commit-sha.ts from /Users/tlkiong/Desktop/work/test/node_modules/import-from/index.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/tlkiong/Desktop/work/test/package.json.
And yes, I have "type": "module", in my package.json
Describe the bug
Seems to be unable to load ESM for a local plugin.
To Reproduce
.auto/plugins/test.ts
console.log('Works')
intests.ts
file.autorc
, do the followingyarn auto shipit -d
output:
And yes, I have
"type": "module",
in mypackage.json
Expected behavior
Screenshots
Environment information:
Additional context
The text was updated successfully, but these errors were encountered: