Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(core): update troubleshoot installation docs #16446

Merged
merged 1 commit into from
Apr 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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