Skip to content

Commit

Permalink
docs(core): update troubleshoot installation docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Cammisuli committed Apr 20, 2023
1 parent fab2325 commit b07fe7b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions docs/shared/installation/troubleshoot-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,20 @@ Some npm users are experiencing errors like the following:
NX Cannot find module '@nrwl/nx-linux-x64-gnu'
```

This happens because the package-lock.json file was not correctly updated by npm, and missed optional dependencies used by Nx.
You can read more about this [issue on the npm repository.](https://github.com/npm/cli/issues/4828)
There are two reasons why this could potentially happen:

1. Running your install command with `--no-optional` (or the relative flag in yarn, pnpm, etc)
2. The package-lock.json file was not correctly updated by npm, and missed optional dependencies used by Nx.
You can read more about this [issue on the npm repository.](https://github.com/npm/cli/issues/4828)

{% callout type="note" title="Updating Nx" %}
When updating Nx that is already on 15.8, the package-lock.json should continue to be updated properly with all the proper optional dependencies.
{% /callout %}

### How to fix

Deleting your node_modules and `package-lock.json` and re-running `npm i` should make sure that everything is created properly in the newly generated `package-lock.json`.
1. If you are running your install command with `--no-optional`, try again without the flag.
2. Delete your node_modules and `package-lock.json` and re-run `npm i`. This should have the `package-lock.json` file updated properly.

### Supported native module platforms

Expand Down

0 comments on commit b07fe7b

Please sign in to comment.