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
When trying to run codemods after upgrading to rtk 2 (based on suggestion from docs) I get:
✗ npx @reduxjs/rtk-codemods createReducerBuilder ./src
(node:121639) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
/home/karlosos/.npm/_npx/c7474bb40fa6e968/node_modules/@reduxjs/rtk-codemods/bin/cli.js:2
import { execaSync } from 'execa'
^^^^^^
SyntaxError: Cannot use import statement outside a module
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1153:20)
at Module._compile (node:internal/modules/cjs/loader:1205:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
at node:internal/main/run_main_module:23:47
Node.js v20.6.1
Is this a problem with my config?
✗ npm --version
9.8.1
➜ node --version
v20.6.1
The text was updated successfully, but these errors were encountered:
karlosos
changed the title
rtk-codemods
rtk-codemods: Cannot use import statement outside a module
Feb 7, 2024
When trying to run codemods after upgrading to rtk 2 (based on suggestion from docs) I get:
Is this a problem with my config?
The text was updated successfully, but these errors were encountered: