You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The angular CLI produces projects that don't work with yarn PnP even after following the steps described at #16980.
🔬 Minimal Reproduction
ng new test-project --skip-git --skip-install --defaults
cd test-project
yarn set version berry
yarn add -D @yarnpkg/pnpify
yarn unplug -R @angular/*
yarn unplug -R @angular-devkit/*
yarn pnpify ng serve
🔥 Exception or Error
An unhandled exception occurred: Cannot find package '@angular/compiler-cli' imported from /[redacted]/test-project/.yarn/unplugged/@angular-devkit-build-angular-virtual-032fd50c3d/node_modules/@angular-devkit/build-angular/src/utils/load-esm.js
Did you mean to import @angular-compiler-cli-virtual-76b21e31a9/node_modules/@angular/compiler-cli/bundles/index.js?
See "/tmp/ng-daXJrV/angular-errors.log" for further details.
Here's the referenced log file:
[error] Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@angular/compiler-cli' imported from /[redacted]/test-project/.yarn/unplugged/@angular-devkit-build-angular-virtual-032fd50c3d/node_modules/@angular-devkit/build-angular/src/utils/load-esm.js
Did you mean to import @angular-compiler-cli-virtual-76b21e31a9/node_modules/@angular/compiler-cli/bundles/index.js?
at new NodeError (node:internal/errors:371:5)
at packageResolve (node:internal/modules/esm/resolve:884:9)
at moduleResolve (node:internal/modules/esm/resolve:929:18)
at defaultResolve (node:internal/modules/esm/resolve:1044:11)
at ESMLoader.resolve (node:internal/modules/esm/loader:422:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:222:40)
at ESMLoader.import (node:internal/modules/esm/loader:276:22)
at importModuleDynamically (node:internal/modules/cjs/loader:1041:29)
at importModuleDynamicallyWrapper (node:internal/vm/module:437:21)
at importModuleDynamically (node:vm:381:46)
This is because currently Yarn PNP doesn't support ESM and only works with the legacy Node.JS module system CommonJs.
ESM experimental support will available in Yarn PNP 3.2. For more context please see yarnpkg/berry#638 and yarnpkg/berry#2161. At this point this is not actionable by us.
Let's continue tracking Yarn PNP support in #16980.
🐞 Bug report
Command (mark with an
x
)Is this a regression?
No
Description
The angular CLI produces projects that don't work with yarn PnP even after following the steps described at #16980.
🔬 Minimal Reproduction
ng new test-project --skip-git --skip-install --defaults
cd test-project
yarn set version berry
yarn add -D @yarnpkg/pnpify
yarn unplug -R @angular/*
yarn unplug -R @angular-devkit/*
yarn pnpify ng serve
🔥 Exception or Error
Here's the referenced log file:
🌍 Your Environment
Anything else relevant?
The text was updated successfully, but these errors were encountered: