Open ChenShuy1 opened 1 year ago
cc @ckeditor/ckeditor-5-devops
Same on the CI:
No idea that it started happening today. A new npm version changed something or wat?
I suggest upgrading this old version (3.0.0) to the latest in the project root. 3.0.0 does not support React 18. It was added in 4.0.1. However, CKE 5 uses 18 somewhere.
I wouldn't be surprised if this commit introduced the regression: https://github.com/ckeditor/ckeditor5/commit/dbe440fa88b71ab0d7ac6fe638ac832023d09f54.
Regarding the CI. Please, wait for the final migration. Its progress can be tracked:
I have tried to modify the @ckeditor/ckeditor5-react
version from ^3.0.3 to ^4.0.1, but it still not working.
terminal information:
$ npm install
npm ERR! Cannot set properties of null (setting 'parent')
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/syc/.npm/_logs/2023-08-24T06_42_41_257Z-debug-0.log
Updating the package to the latest version also does not work. I had slightly different results while installing ^5
, but in the end, it crashed due to a lack of access to husky
(ckeditor5
post-install hook).
Removing any reference to the React integration package also does not help. Npm ends with the npm ERR! Cannot set properties of null (setting 'parent')
error.
The issue seems to be related to two devDependencies
:
"@ckeditor/ckeditor5-react": "^3.0.0"
"@ckeditor/ckeditor5-real-time-collaboration": "39.0.2"
Removing both lets us perform successful install.
When only cke5-react
is removed, we get this error:
null
When only cke5-rtc
is removed, we get this error:
ERESOLVE
Here are the combinations I've tested:
Without cke5-rtc |
With cke5-rtc |
|
cke5-react at v3 |
ERESOLVE |
ERESOLVE |
Without cke5-react |
β | null |
cke5-react bump to v4 |
β | null |
cke5-react bump to v5 |
β | null |
cke5-react bump to v6 |
ERESOLVE |
ERESOLVE |
After changing the name
field in the root package.json
to something else, eg. ckeditor5-foo
the null
error disappears:
Without cke5-rtc |
With cke5-rtc |
|
cke5-react at v3 |
ERESOLVE |
ERESOLVE |
Without cke5-react |
β | β |
cke5-react bump to v4 |
β | β |
cke5-react bump to v5 |
β | β |
cke5-react bump to v6 |
ERESOLVE |
ERESOLVE |
Done the following:
Removed (from devDependencies):
"@ckeditor/ckeditor5-react": "^3.0.0"
"@ckeditor/ckeditor5-real-time-collaboration": "39.0.2"
Changed the name
field in the root package.json
to ckeditor5-Venkat
But, still getting this:
C:\RnD\ckeditor5\ckeditor5\packages\ckeditor5-build-classic>npm i
npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin.
> ckeditor5-Venkat@39.0.2 postinstall
> node ./scripts/postinstall.js
node:internal/modules/cjs/loader:1080
throw err;
^
Error: Cannot find module 'husky'
Require stack:
- C:\RnD\ckeditor5\ckeditor5\scripts\postinstall.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
at Module._load (node:internal/modules/cjs/loader:922:27)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at require (node:internal/modules/cjs/helpers:121:18)
at Object.<anonymous> (C:\RnD\ckeditor5\ckeditor5\scripts\postinstall.js:15:1)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ 'C:\\RnD\\ckeditor5\\ckeditor5\\scripts\\postinstall.js' ]
}
Node.js v18.17.1
npm ERR! code 1
npm ERR! path C:\RnD\ckeditor5\ckeditor5
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node ./scripts/postinstall.js
npm ERR! A complete log of this run can be found in: C:\Users\prabhuv1\AppData\Local\npm-cache\_logs\2023-09-08T04_48_39_577Z-debug-0.log
I upgraded the used major version in the @ckeditor/ckeditor5-react
package to 6. (change)
Then, I cloned the repository:
git clone git@github.com:ckeditor/ckeditor5 --depth 2 --single-branch --branch stable
Then, updated package.json
to drop workspaces. Npm and yarn are incompatible, but I think yarn understands npm syntax so that we can simplify.
diff --git a/package.json b/package.json
index 89177fd..0f9e7fc 100644
--- a/package.json
+++ b/package.json
@@ -208,13 +208,5 @@
"packages/*/src/lib/**",
"coverage/**",
"external/**"
- ],
- "workspaces": {
- "packages": [
- "packages/*",
- "external/*",
- "external/*/packages/*",
- "."
- ]
- }
+ ]
}
Executing npm install
ends with some alerts, but looks like it works.
> ckeditor5@39.0.2 postinstall
> node ./scripts/postinstall.js
husky - Git hooks installed
up to date, audited 2071 packages in 6s
252 packages are looking for funding
run `npm fund` for details
25 vulnerabilities (2 low, 5 moderate, 15 high, 3 critical)
To address issues that do not require attention, run:
npm audit fix
To address all issues possible (including breaking changes), run:
npm audit fix --force
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
Due to a lack of workspaces, the entire environment does not use the source of packages. Instead, if installed packages from npm.
Let me see if we can have workspaces too.
Finally, I installed the project using npm. Packages are linked (packages/
and node_modules/@ckeditor
).
I proposed a PR #14956. Perhaps we can merge it next week if the proposed changes look good.
Unfortunately, I had a local copy of package-lock.json
that helped resolve versions of dependencies. After the removal of this file, I have no progress.
@ckeditor/ckeditor5-react
package. Removing it unblocks the project.ckeditor5
package in the packages/
directory does not help too.@ckeditor/ckeditor5-*
to ckeditor5
in the React integration does not help. (change)After spending over 2 hours debugging this problem, I have no idea how to progress it. We have some issues with package.json
, which yarn tolerates, accepts, and can resolve. Unfortunately, npm can't by default. Enabling the legacy peer deps option goes "smoothly".
Any workaround?
We recommend using Yarn@1. Is it possible for you?
We recommend using Yarn@1. Is it possible for you?
Yes... it worked
π Provide detailed reproduction steps (if any)
git clone -b stable https://github.com/ckeditor/ckeditor5.git
npm install
βοΈ Expected result
install all dependencies
β Actual result
when I use
npm install
, it's like:then I tried
npm install --force
, it's like:β Possible solution
I dont knowπ’
π Other details
If you'd like to see this fixed sooner, add a π reaction to this post.