-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v42 - Vite dev build fails using Yarn PnP #16646
Comments
Most of our packages have I have created a few PRs to fix this, and will discuss this with the team, as it will require some changes to the internal tooling. |
Out of curiosity: Why has it surfaced now? We didn't have those deps listed there for years now. Is it related to NIM or it was always a problem? |
It's related to new installation methods (NIM). During the build process, some of the imports are rewritten to make code written for old installation methods work with NIM. For example: // This import ...
import { Plugin } from 'ckeditor5/src/core.js';
// ^^^^^^^^^
// ... will be replaced with.
import { Plugin } from '@ckeditor/ckeditor5-core/dist/index.js';
// ^^^^^^^^^^^^^^^^^^^^^^^^ Before the changes, the only direct dependency of most packages was the |
…od-deps Fix (dependency-checker): Treat dependencies in the `dist` folder as production dependencies. See ckeditor/ckeditor5#16646. MINOR BREAKING CHANGE (dependency-checker): Treat dependencies in the `dist` folder as production `dependencies`. Other (build-tools): The `.d.ts` files for translations should import directly from `@ckeditor/ckeditor5-utils` instead of `ckeditor5`. See ckeditor/ckeditor5#16646.
This problem has been fixed in |
📝 Provide detailed reproduction steps (if any)
CKEditor
component from@ckeditor/ckeditor5-react
)✔️ Expected result
Vite dev builds/runs successfully
❌ Actual result
Vite dev build failed with 168 instances of the same error, but with different instances. Below is an example of just one instance of the error in the CLI output
❓ Possible solution
I was able to resolve the build issue on my end by making use of Yarn's
packageExtensions
config option, which is meant as an escape hatch for "packages {that] may have been specified incorrectly with regard to their dependencies".I'm filing this issue because it's likely that there's some dependency misconfiguration that other package managers or installation strategies are less strict about.
For your reference (and for anyone else experiencing the same issue), here is the config that got rid of all of the build errors and the app running as expected:
📃 Other details
Development Environment:
Yarn 4.30 using Yarn Plug'n'Play (pnp)
Vite 5.3.0
React 18.3.1
Browser: Chrome (NA)
OS: macOs Sonoma 14.5
First affected CKEditor version: v42.0.0
Installed CKEditor plugins:
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: