Skip to content

Commit

Permalink
docs(angular): document PNPM workaround for ngcc (nrwl#19041)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Shuy <[email protected]>
  • Loading branch information
isaacplmann and daniel-shuy authored Sep 7, 2023
1 parent c2c664a commit 2cc40a1
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions docs/shared/guides/setup-incremental-builds-angular.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,25 @@ installation. You can check your `package.json` and make sure you have the follo
}
```

{% callout type="warning" title="ngcc limitations" %}
Please note that `ngcc` doesn’t support `pnpm` ([#32087](https://github.com/angular/angular/issues/32087#issuecomment-523225437) and [#38023](https://github.com/angular/angular/issues/38023#issuecomment-732423078)), so you need to use either `yarn` or `npm`.
{% callout type="warning" title="PNPM support" %}
To use `ngcc` with `pnpm`, set [`node-linker=hoisted` in `.npmrc`](https://pnpm.io/npmrc#node-linker) ([angular/angular#50735](https://github.com/angular/angular/issues/50735)) and explicitly declare `node-gyp-build` in `package.json` ([#16319](https://github.com/nrwl/nx/issues/16319) and [parcel-bundler/watcher#142](https://github.com/parcel-bundler/watcher/issues/142)), e.g.

```ini {% fileName=".npmrc" %}
node-linker=hoisted
```

```jsonc {% fileName="package.json" %}
{
...
"devDependencies": {
...
"node-gyp-build": "4.6.0",
...
}
...
}
```

{% /callout %}

## Use buildable libraries
Expand Down

0 comments on commit 2cc40a1

Please sign in to comment.