Skip to content

error code ECOMPROMISED - npm error Lock compromised #893

Closed as not planned

Description

@eliassal

Inspector Version

Trying to install for 1st time

Image

Describe the bug
Run
npx @modelcontextprotocol/inspector
To Reproduce
Steps to reproduce the behavior:

Run npx @modelcontextprotocol/inspector
Expected behavior
Inspector should be launched

Screenshots

Image

Environment (please complete the following information):

  • OS: win 10 64bit
  • Browser Edge

Here is the log for npm-cache_logs\2025-10-29T11_18_21_143Z-debug-0.log

1386 verbose stack Error: Lock compromised
1386 verbose stack at AbortSignal. (.......AppData\Roaming\nvm\v25.0.0\node_modules\npm\node_modules\libnpmexec\lib\with-lock.js:52:30)
1386 verbose stack at [nodejs.internal.kHybridDispatch] (node:internal/event_target:845:20)
1386 verbose stack at AbortSignal.dispatchEvent (node:internal/event_target:778:26)
1386 verbose stack at runAbort (node:internal/abort_controller:488:10)
1386 verbose stack at abortSignal (node:internal/abort_controller:459:3)
1386 verbose stack at AbortController.abort (node:internal/abort_controller:507:5)
1386 verbose stack at Timeout.touchLock (........\AppData\Roaming\nvm\v25.0.0\node_modules\npm\node_modules\libnpmexec\lib\with-lock.js:161:18)
1387 error code ECOMPROMISED
1388 error Lock compromised
1389 silly unfinished npm timer reify 1761736705161
1390 silly unfinished npm timer reify:createSparse 1761736707714
1391 verbose cwd C:\Projects\WindowsScripts\PS\Scripts
1392 verbose os Windows_NT 10.0.19045
1393 verbose node v25.0.0
1394 verbose npm v11.6.2
1395 verbose exit 1
1396 verbose code 1
1397 error A complete log of this run can be found in: C:\Users\salam.SALAM\AppData\Local\npm-cache_logs\2025-10-29T11_18_21_143Z-debug-0.log

Activity

  1. olaservo commented on Nov 3, 2025

    @olaservo
    Member

    Hi @eliassal! I think this ECOMPROMISED error could be a side effect from npm's enhanced security checks. The inspector package itself is not compromised.

    Try these steps:

    1. Clear npm cache and locks:
       npm cache clean --force
    1. Remove stale npx cache (Windows):
       rmdir /s /q "%LOCALAPPDATA%\npm-cache\_npx"
    1. Try again:
       npx @modelcontextprotocol/inspector@latest

    If that doesn't work, try forcing a fresh install:

    npx --yes @modelcontextprotocol/inspector@latest
  2. added
    waiting on submitter
    on Nov 3, 2025
  3. eliassal commented on Nov 4, 2025

    @eliassal
    Author

    Hi @olaservo , I ran the cache clean and rmdir then both commands in step 3 and 4, got the exact same error

    Image
  4. aaronpowell commented on Nov 6, 2025

    @aaronpowell
    Contributor

    I've also been noticing this quite frequently with the MCP Inspector package for aspire during out CI builds (eg: https://github.com/CommunityToolkit/Aspire/actions/runs/19124005873/job/54650441604?pr=914)

    The CI job will dump the npm logs with max verbosity enabled:

    2025-11-06T03_44_16_226Z-debug-0.log

  5. added
    bug
    and removed
    waiting on submitter
    on Nov 9, 2025
  6. self-assigned this
    on Nov 11, 2025
  7. jenseng commented on Nov 15, 2025

    @jenseng

    this is due to a regression in npm, and a fix will be out soon. in the meantime you could use npm@11.6.0

  8. added
    closed-v1-deprecated
    on Aug 1, 2026
  9. cliffhall commented on Aug 1, 2026

    @cliffhall
    Member

    Closing: v1 is deprecated.

    Thank you for reporting this, and apologies for the long wait for a response.

    v1 will receive security fixes only — this issue describes a functionality, compatibility, or usability problem rather than a vulnerability, so it is being closed against v1. This is not a judgment on whether the problem is real — it's a consequence of the v1 line being frozen. This is happening as part of #1872.

    If this still happens in v2, we'd genuinely like to know. v2 is a complete rewrite — three clients over a shared core — so many v1 behaviours no longer exist in the same form. Please open a fresh issue against v2 with steps to reproduce, and we'll look at it. Note that we accept external contributions as issues rather than pull requests; maintainers handle design and implementation through a prompt-driven workflow. See CONTRIBUTING.md.

    Thanks for taking the time to report it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugclosed-v1-deprecatedv1

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions