Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
On every window load, Cursor shows: Npm task detection: failed to parse the file d:\David\Git\aiscr-management\package.json
The file is valid JSON (about 700 bytes). npm ci and npm run succeed in the terminal. The NPM Scripts list stays empty.
The Tasks output only shows that rewritten message. The exception underneath is not a JSON parse failure. It is thrown by $tryOpenDocument before the npm extension reads scripts:
CodeExpectedError: cannot open file:///d%3A/David/Git/aiscr-management/package.json. Detail: Documents above the size limit cannot be synchronized with extensions.
at QCo.$tryOpenDocument (workbench.desktop.main.js)
The sync limit in this build is 50 MB. This package.json is far under it. The npm extension catch replaces every openTextDocument failure with the parse message, so the size-limit detail never reaches the Tasks log.
Steps to Reproduce
- Open a local Windows folder whose root package.json is valid and small (single package, not a large monorepo).
- Reload the window.
- Open Output > Tasks.
The parse error is logged immediately. It happens on every reload, not only during a one-second startup race.
Expected Behavior
NPM scripts from package.json appear in the NPM Scripts view, and Tasks does not report a parse error for a valid file.
Operating System
Windows 10/11
Version Information
Cursor Version: 3.21.18
VSCode Version: 1.128.0
Commit: c4730f7d93d787d9ab120af715999f0345ee5bc0
Build Type: Stable
OS: Windows 10/11
Additional Information
Related closed thread: Bug report 2: NPM task detection fails to parse valid package.json
That thread describes a large pnpm monorepo and a file-open race. This case is a single small package.json and the error is present on every window load. Terminal npm is unaffected.
Does this stop you from using Cursor
No - Cursor works, but with this issue