-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
The task-master-ai package (version 0.27.0) fails to start with a SyntaxError related to importing LRUCache from the lru-cache module. The error message indicates that the named export is not found, suggesting an issue with how the module is being imported.
Steps to Reproduce:
Run npx -y task-master-ai --help or any command that executes the package
Observe the error in the terminal
Expected Behavior:
The package should start successfully and display help information or execute the requested command.
Actual Behavior:
The package crashes with the following error:
SyntaxError: Named export 'LRUCache' not found. The requested module 'lru-cache' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'lru-cache';
const {LRUCache} = pkg;
Environment:
OS: Linux
Node.js version: v22.19.0
Package version: 0.27.0
Command used: npx -y task-master-ai --help
Additional Context:
The package is marked as deprecated with a note saying "coming out with a patch to fix this asap"
This affects both the MCP server (task-master-ai) and CLI (task-master) binaries
The issue prevents the MCP integration from working in VS Code/Cursor
lru-cache version in dependencies: ^10.2.0 (which is ESM, but the error suggests it's being treated as CommonJS)
Possible Solution:
The error suggests using a default import instead of named import for LRUCache. The code likely needs to be changed from:
import { LRUCache } from 'lru-cache';
to:
import pkg from 'lru-cache';
const { LRUCache } = pkg;
Metadata
Metadata
Assignees
Labels
Projects
Status