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(angular): document PNPM workaround for ngcc #19041

Merged
merged 2 commits into from
Sep 7, 2023

Conversation

isaacplmann
Copy link
Collaborator

Fix from #18100

Current Behavior

Currently, https://nx.dev/recipes/other/setup-incremental-builds-angular#requirements still warns that ngcc doesn't support PNPM.

Expected Behavior

While ngcc doesn't support PNPM out-of-the-box, PNPM has since added a node-linker=hoisted mode that creates flat node_modules without symlinks, similar to the node_modules created by NPM, allowing ngcc to work with PNPM (angular/angular#50735).

Unfortunately, using node-link=hoisted breaks @parcel/watcher that is used by NX (#16319 and parcel-bundler/watcher#142). A workaround is to explicitly declare node-gyp-build in package.json, e.g.

{
  ...
  "devDependencies": {
    ...
    "node-gyp-build": "4.6.0",
    ...
  }
  ...
}

This PR documents the workarounds to use ngcc with PNPM.

p.s. Huge thanks to @DzmVasileusky for discovering the workarounds.

@isaacplmann isaacplmann requested a review from a team as a code owner September 6, 2023 21:29
@isaacplmann isaacplmann requested a review from bcabanes September 6, 2023 21:29
@vercel
Copy link

vercel bot commented Sep 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 7, 2023 1:39am

@isaacplmann isaacplmann self-assigned this Sep 7, 2023
Copy link
Member

@juristr juristr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have this documented in other places too? Like in general for using PNPM with Angular?

@isaacplmann isaacplmann merged commit 2cc40a1 into nrwl:master Sep 7, 2023
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants