Skip to content

Commit 4bbb783

Browse files
authored
Update migration-guide-4.2.x-to-4.3.x.md (#2199)
Add a note for users on node v16 that explains how to work around a sub dependency engine version compatibility issue.
1 parent fc8e449 commit 4bbb783

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

docusaurus/docs/dev-docs/migration/v4/migration-guide-4.2.x-to-4.3.x.md

+19
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,25 @@ Stop the server before starting the upgrade. At the time of writing this, the la
4646

4747
3. <InstallCommand components={props.components} />
4848

49+
:::note
50+
If you are on a Node <=16.x version, you might get an error stating that the `cheerio` sub-dependency of of `@strapi/plugin-documentation` requires node >=18.17.
51+
52+
The reason is that the version specifier for `cheerio` in Strapi >=4.2.x is `^1.0.0-rc.12`, which used to resolve to the version `1.0.0-rc.12` that supported Node v16, but now it resolves to `1.0.0` (non-rc) which has a requirement for Node >=18.17.
53+
54+
As a workaround in yarn, you can add a resolution to your `package.json` that pins cheerio at the exact release candidate that still supports Node v16:
55+
56+
```json title="path: ./package.json"
57+
{
58+
// ...
59+
"resolutions": {
60+
"@strapi/plugin-documentation/**/cheerio": "1.0.0-rc.12"
61+
},
62+
// ...
63+
}
64+
```
65+
Next, run `yarn` again. When you upgrade to a later Strapi version that supports Node 18, remove this resolution.
66+
:::
67+
4968
## Updating the database configuration script
5069

5170
This step is only required if you use the default SQLite database configuration in a TypeScript project.

0 commit comments

Comments
 (0)