-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
I encountered this error after finishing a task in Claude Code.
Node v19.9.0 (npm v9.6.3)
⏺ Stop [/Users/***/.claude/count_tokens.js] failed with non-blocking status code 1: (node:35410) 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)
/Users/***/.claude/count_tokens.js:3
import { readFile, stat, readdir, writeFile, mkdir } from 'node:fs/promises';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1195:20)
at Module._compile (node:internal/modules/cjs/loader:1239:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1329:10)
at Module.load (node:internal/modules/cjs/loader:1133:32)
at Module._load (node:internal/modules/cjs/loader:972:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
at node:internal/main/run_main_module:23:47
Node.js v19.9.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels