Problems with some @atlaskit packages and yarn 4

Hi Atlassian community,

we are using yarn when developing our apps. Currently we are using yarn 4.5.0 and encounter problems with some @atlaskit packages.

For example “@atlaskit/editor-common”: “71.0.3” and “@atlaskit/media-viewer”: “48.0.7” work without issues with yarn 4.5.0. But when we update to “@atlaskit/editor-common”: “72.0.0” and “@atlaskit/media-viewer”: “48.0.8” we encounter the following error:

yarn install
➤ YN0000: · Yarn 4.5.0
➤ YN0000: ┌ Resolution step
➤ YN0085: │ + @atlaskit/editor-common@npm:72.0.0, @atlaskit/media-viewer@npm:48.0.8, @atlaskit/adf-schema@npm:25.10.1, @atlaskit/adf-utils@npm:18.4.3, and 15 more.
➤ YN0085: │ - @atlaskit/adf-schema@npm:24.0.3, @atlaskit/adf-utils@npm:17.1.5, @atlaskit/editor-common@npm:71.0.3, @atlaskit/emoji@npm:66.1.2, and 7 more.
➤ YN0000: └ Completed in 1s 547ms
➤ YN0000: ┌ Post-resolution validation
➤ YN0002: │ test123@workspace:. doesn't provide @atlaskit/media-core (p4e6c4), requested by @atlaskit/editor-common.
➤ YN0002: │ test123@workspace:. doesn't provide @emotion/react (p0dda0), requested by @atlaskit/media-viewer.
➤ YN0002: │ test123@workspace:. doesn't provide react (p9e4a5), requested by @atlaskit/editor-common and other dependencies.
➤ YN0002: │ test123@workspace:. doesn't provide react-dom (pd5054), requested by @atlaskit/editor-common.
➤ YN0002: │ test123@workspace:. doesn't provide react-intl-next (pb572b), requested by @atlaskit/editor-common and other dependencies.
➤ YN0086: │ Some peer dependencies are incorrectly met by your project; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code.
➤ YN0086: │ Some peer dependencies are incorrectly met by dependencies; run yarn explain peer-requirements for details.
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0001: │ Error: Assertion failed: The locator should have been registered
    at /home/user/temp/test/.yarn/releases/yarn-4.5.0.cjs:210:11433
    at /home/user/temp/test/.yarn/releases/yarn-4.5.0.cjs:140:55074
    at Array.map (<anonymous>)
    at Fs (/home/user/temp/test/.yarn/releases/yarn-4.5.0.cjs:140:55067)
    at t.fetchEverything (/home/user/temp/test/.yarn/releases/yarn-4.5.0.cjs:210:11348)
    at /home/user/temp/test/.yarn/releases/yarn-4.5.0.cjs:213:4080
    at Rt.startSectionPromise (/home/user/temp/test/.yarn/releases/yarn-4.5.0.cjs:176:2834)
    at Rt.startTimerPromise (/home/user/temp/test/.yarn/releases/yarn-4.5.0.cjs:176:3734)
    at t.install (/home/user/temp/test/.yarn/releases/yarn-4.5.0.cjs:213:4028)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
➤ YN0000: └ Completed
➤ YN0000: · Failed with errors in 1s 562ms

This also fails in a minimal example with only these two packages in the package.json.

When we use yarn 1.22.22 it seems to work. Can you tell us which yarn versions you support and if there is something we can do? Additional it would be great if you could continue to support yarn 4.5.0 as you did with older versions of these @atlaskit packages.

Best,
Tim

3 Likes

We found a fix/workaround.

When adding

"react-focus-lock": "^2.9.5",
"react-focus-lock-next": "npm:react-focus-lock@^2.13.2",

as a dependency in our package.json we were able to run yarn install again.

We also raised a big-ticket with yarn ([Bug?]: Error: Assertion failed: The locator should have been registered · Issue #6573 · yarnpkg/berry · GitHub). There the investigation is still ongoing.

I hope that this will help someone else who is also stumbling over this problem.

2 Likes