We're running ABP Framework 10.4 with an Angular 21 frontend. Our angular/ project uses Yarn Berry 4.12.0 (nodeLinker: node-modules in .yarnrc.yml), not Yarn Classic — this is required for our dependency setup (private npm registry scopes for FontAwesome Pro, etc.).
The problem: abp install-libs appears to only support/detect Yarn Classic 1.x, so our local setup script has to explicitly switch Yarn versions back and forth via Corepack around it:
corepack prepare yarn@1.22.22 --activate
abp install-libs
corepack prepare yarn@4.12.0 --activate
yarn install
This is fragile in practice: abp install-libs internally runs an unfrozen yarn install under whichever Yarn version is currently active. When it runs under Yarn 1, it silently rewrites yarn.lock back into the old v1 lockfile format. If the script is ever interrupted, or someone runs abp install-libs in isolation without the follow-up corepack prepare yarn@4.x --activate && yarn install, the repository can end up with a Yarn-1-format lockfile committed on top of a Yarn-Berry project — completely silently, since a plain local yarn install doesn't complain about it. This happened to us once and was hard to trace back.
Questions:
- Is there a supported way to make
abp install-libswork with an already-active Yarn Berry installation, instead of requiring Yarn 1 specifically? - Since the docs state
install-libsis meant for MVC/Razor Pages/Blazor Server only — is it actually required at all for an Angular project, or is calling it in our setup script simply unnecessary legacy boilerplate we can drop?
Any clarification would help us remove this two-Yarn-version workaround entirely.
1 Answer(s)
-
0
- There is no supported way (in ABP 10.4.x) to make
abp install-libswork with Yarn Berry. ABP’s guidance for its frontend tooling is to use Yarn Classic (v1.22+) (not v2+), so the CLI behavior you’re seeing is consistent with the supported tooling expectations. - For an Angular UI solution,
abp install-libsis not required (and in your case, it’s actively harmful because it can rewriteyarn.lockto v1 format). You can remove it from your setup script. Theinstall-libscommand is for installing/copying web (JS/CSS) libraries intowwwroot/libsfor MVC/Razor Pages/Blazor Server style UIs; Angular manages its dependencies via its own package manager workflow (yarn install,yarn start/build) and does not need thatwwwroot/libsstep.
Practical recommendation for your repo:
- Delete
abp install-libsfrom your onboarding/build scripts for the Angular project. - Keep your Yarn Berry/Corepack workflow only:
corepack prepare yarn@4.12.0 --activate yarn install- (Optional hardening) Add a CI check to fail if
yarn.lockis rewritten to a v1 header format, to prevent silent regressions.
Source (ABP prerequisite explicitly recommending Yarn Classic, not v2+):
- https://abp.io/docs/latest/get-started/pre-requirements
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) - There is no supported way (in ABP 10.4.x) to make