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 tried to improve this repository by fork.
But I can't build . npm run build is failed with error.
> [email protected] build
> rm -rf dist && rollup -c rollup.config.ts --configPlugin @rollup/plugin-typescript && ncc build src/github-action.cjs -o action
loaded rollup.config.ts with warnings
(!) Plugin typescript: @rollup/plugin-typescript: Rollup 'sourcemap' option must be set to generate source maps.
[!] RollupError: Rollup transpiled your configuration to an ES module even though it appears to contain CommonJS elements. To resolve this, you can pass the "--bundleConfigAsCjs" flag to Rollup or change your configuration to only contain valid ESM code.
Original error: exports is not defined in ES module scope
https://rollupjs.org/command-line-interface/#bundleconfigascjs
ReferenceError: exports is not defined in ES module scope
Also, I couldn't run the test code.
> [email protected] test
> jest
FAIL test/index.test.ts
● Test suite failed to run
test/index.test.ts:6:8 - error TS1192: Module '"/Users/yonghoonlee/gitroot/ChatGPT-CodeReview/src/index"' has no default export.
6 import myProbotApp from "../src";
~~~~~~~~~~~
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 1.431 s
Ran all test suites.
How can I build and test?
The text was updated successfully, but these errors were encountered:
Hi, the test code is not runnable. And for the build issue, I guess it's caused by your node version is old and doesn't support esm module, try to upgrade it to new rts version.
Hi, the test code is not runnable. And for the build issue, I guess it's caused by your node version is old and doesn't support esm module, try to upgrade it to new rts version.
Hi, I'm using LTS(18.17.1) but I can't build with the error :(
I am using node v20, I tried switching to v18, and still works fine for me.
Make sure that you didn't change any code based on the main branch, and in the package.json, have the right type declaration.
{
"type": "module"
}
if you did this and still not work, try the suggestion by the console
RollupError: Rollup transpiled your configuration to an ES module even though it appears to contain CommonJS elements. To resolve this, you can pass the "--bundleConfigAsCjs" flag to Rollup or change your configuration to only contain valid ESM code.
I tried to improve this repository by fork.
But I can't build .
npm run build
is failed with error.Also, I couldn't run the test code.
How can I build and test?
The text was updated successfully, but these errors were encountered: