# npm

### How to replace an npm package

1. In the root directory of your project, open the `package.json` file.
2. If the vulnerability is in a direct dependency just replace the existing version constraint in the `dependencies` section:

   ```json
   {
      "dependencies": {
         "package": "1.7.9-sp1"
      }
   }
   ```
3. If the vulnerability is in a transitive dependency just add to the `overrides` section (if one doesn't exist yet, you'll have to add it to the file) the following:

   ```json
   {
      "overrides": {
         "package@1.7.9": "1.7.9-sp1"
      }
   }
   ```
4. In the root directory, run `npm install`.


---

# Agent Instructions: 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://docs.sealsecurity.io/fundamentals/artifact-server/editing-your-dependencies/npm.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.
