Skip to content

@ngtools/webpack expects yarn or npm, but not pnpm #22632

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

Closed
Usaga opened this issue Feb 2, 2022 · 1 comment · Fixed by #22633
Closed

@ngtools/webpack expects yarn or npm, but not pnpm #22632

Usaga opened this issue Feb 2, 2022 · 1 comment · Fixed by #22633
Assignees
Labels
area: @ngtools/webpack freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix
Milestone

Comments

@Usaga
Copy link

Usaga commented Feb 2, 2022

Hi!

@ngtools/webpack performs a ngcc run check to determine if an initial execution is required. It looks for yarn.lock or package-lock.json to run this check. But our project uses pnpm, which has pnpm-lock.yaml. And @ngtools/webpack thinks it is first time build and runs 'ngcc'.

We are using version 12.2.14, but I see this code still there:

    try {
      let lockData;
      let lockFile = 'yarn.lock';
      try {
        lockData = readFileSync(path.join(projectBasePath, lockFile));
      } catch {
        lockFile = 'package-lock.json';
        lockData = readFileSync(path.join(projectBasePath, lockFile));
      }

      let ngccConfigData;
      try {
        ngccConfigData = readFileSync(path.join(projectBasePath, 'ngcc.config.js'));
      } catch {
        ngccConfigData = '';
      }
@alan-agius4 alan-agius4 added area: @ngtools/webpack freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix labels Feb 2, 2022
@ngbot ngbot bot modified the milestone: Backlog Feb 2, 2022
@alan-agius4 alan-agius4 self-assigned this Feb 2, 2022
filipesilva pushed a commit that referenced this issue Feb 7, 2022
…ocessing

Previously, we only handled Yarn and NPM lock files even though PNPM is supported as package manager.

The lock file is used to perform checks to determine if an initial execution of NGCC was already performed.

Closes #22632
filipesilva pushed a commit that referenced this issue Feb 7, 2022
…ocessing

Previously, we only handled Yarn and NPM lock files even though PNPM is supported as package manager.

The lock file is used to perform checks to determine if an initial execution of NGCC was already performed.

Closes #22632

(cherry picked from commit 966dd01)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 10, 2022
ikjelle pushed a commit to ikjelle/angular-cli that referenced this issue Mar 26, 2024
…ocessing

Previously, we only handled Yarn and NPM lock files even though PNPM is supported as package manager.

The lock file is used to perform checks to determine if an initial execution of NGCC was already performed.

Closes angular#22632
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: @ngtools/webpack freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants