Skip to content

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

@Usaga

Description

@Usaga

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 = '';
      }

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions