-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Closed
Labels
bugSomething isn't workingSomething isn't workingduplicateThis issue or pull request already existsThis issue or pull request already exists
Description
Bug Description
skills/brainstorming/scripts/server.js uses CommonJS syntax (require(), module.exports) but package.json declares "type": "module", causing Node.js to treat all .js files as ES modules.
Error
ReferenceError: require is not defined in ES module scope, you can use import instead
This file is being treated as an ES module because it has a '.js' file extension and
'...\superpowers\5.0.4\package.json' contains "type": "module".
Steps to Reproduce
- Install the superpowers plugin (v5.0.4)
- Trigger the brainstorming skill which calls
start-server.sh - The script runs
node server.jswhich fails immediately
Environment
- Windows 11, Git Bash
- Node.js v22.17.1
- superpowers v5.0.4
Workaround
Rename server.js → server.cjs and update the two references in start-server.sh (lines 112 and 118) from node server.js to node server.cjs.
Suggested Fix
Either:
- Rename
server.jstoserver.cjsand updatestart-server.sh(minimal change) - Or convert
server.jsto ESM syntax (importinstead ofrequire, etc.)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingduplicateThis issue or pull request already existsThis issue or pull request already exists