In my project, when running into this error, prior to the Link step
as quoted in the question above, where I was also getting a number of must be built because it never has been before or the last one failed
errors, there were a number of warnings in the Resolution step
, like:
➤ YN0000: ┌ Resolution step
➤ YN0002: │ vendor-frontend@workspace:. doesn't provide @babel/core (pa3ad5), requested by @babel/plugin-proposal-class-properties
➤ YN0002: │ vendor-frontend@workspace:. doesn't provide @babel/core (p4b1ed), requested by @babel/plugin-proposal-decorators
➤ YN0002: │ (... about a dozen more ...)
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed in 0s 239ms
As Yarn suggests in that last message, I ran:
yarn explain peer-requirements pxxxxx
where in my case pxxxxx
was actually pa3ad5
, the code from the first of those “doesn't provide
” warnings.
For me, this produced:
➤ YN0000: vendor-frontend@workspace:. doesn't provide @babel/core, breaking the following requirements:
➤ YN0000: @babel/helper-create-class-features-plugin@npm:7.20.7 [967d5] → ^7.0.0 ✘
➤ YN0000: @babel/plugin-proposal-class-properties@npm:7.18.6 [8c8ef] → ^7.0.0-0 ✘
➤ YN0000: Note: these requirements start with @babel/plugin-proposal-class-properties@npm:7.18.6 [8c8ef]
“npm”, eh? This prompted me to run:
npm install
This completed successfully:
added 23 packages, removed 32 packages, changed 18 packages, and audited 1351 packages in 15s
But my app (running in my local dev environment) was still showing a compile error.
So I tried circling back to the original command, once again running:
yarn install
This completed successfully, and got my local app up and running again.