> For the complete documentation index, see [llms.txt](https://help.aikido.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.aikido.dev/autofix-and-remediation/faq/npm-corrupt-lockfile.md).

# NPM, PNPM, Yarn - corrupt lockfile

A corrupt lockfile is most commonly caused by a mismatch in node, npm, pnpm or yarn versions between your project and AutoFix. Make sure to configure the node and package manager version in your `package.json`.

AutoFix uses the node & npm version specified in the [engines section](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#engines) of your `package.json` file. Make sure the node version and npm version in your `package.json` match the version you're using locally and in your CI/CD. By algining the versions, you will avoid changes to the `package-lock.json` files by AutoFix.

For example:

```
{
  "engines": {
    "node": "22",
    "npm": "11.14.1",
    "pnpm": "11.7.0",
    "yarn": "^4.17.11"
  }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.aikido.dev/autofix-and-remediation/faq/npm-corrupt-lockfile.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
