Skip to content
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

gutenberg react version conflict #62914

Closed
tanvirSajib opened this issue Jun 27, 2024 · 3 comments
Closed

gutenberg react version conflict #62914

tanvirSajib opened this issue Jun 27, 2024 · 3 comments
Labels
[Tool] WP Scripts /packages/scripts [Type] Bug An existing feature does not function as intended

Comments

@tanvirSajib
Copy link

Description

"@wordpress/scripts": "^24.0.0",
this load react 17.x

when i want to insatll "npm install @wordpress/data --save", it's require react 18.x

if i update "@wordpress/scripts": "^24.0.0" to "@wordpress/scripts": "^28.2.0" , then my react verion is updated but problem is then my plugin didn't show any more.

and there is another two things show in my console
1 deprecated.min.js?ver=e1f84915c5e8ae38964c:2 select( 'core/edit-post' ).isEditorPanelOpened is deprecated since version 6.5. Please use select( 'core/editor' ).isEditorPanelOpened instead.
2 deprecated.min.js?ver=e1f84915c5e8ae38964c:2 Using custom components as toolbar controls is deprecated since version 5.6. Please use ToolbarItem, ToolbarButton or ToolbarDropdownMenu components instead. See: https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols

Step-by-step reproduction instructions

{
"name": "eazydocs-pro",
"version": "0.1.0",
"description": "Example block written with ESNext standard and JSX support – build step required.",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
"main": "build/index.js",
"prettier": "@wordpress/prettier-config",
"stylelint": {
"extends": "@wordpress/stylelint-config/scss"
},
"scripts": {
"build": "wp-scripts build",
"format": "wp-scripts format",
"lint:css": "wp-scripts lint-style",
"lint:js": "wp-scripts lint-js",
"packages-update": "wp-scripts packages-update",
"plugin-zip": "wp-scripts plugin-zip",
"start": "wp-scripts start"
},
"devDependencies": {
"@wordpress/eslint-plugin": "^13.0.0",
"@wordpress/prettier-config": "^2.0.0",
"@wordpress/scripts": "^24.0.0",
"@wordpress/stylelint-config": "^21.0.0",
"eslint-config-prettier": "^8.3.0"
},
"dependencies": {
"@wordpress/element": "^6.2.0"
}
}

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@tanvirSajib tanvirSajib added the [Type] Bug An existing feature does not function as intended label Jun 27, 2024
@tanvirSajib
Copy link
Author

Issue solved.

I solved this problem by updating "@wordpress/scripts": "^24.0.0", to "@wordpress/scripts": "^26.0.0",

previously I updated it to "@wordpress/scripts": "^28.0.0",

@skorasaurus skorasaurus added the [Tool] WP Scripts /packages/scripts label Jun 27, 2024
@t-hamano
Copy link
Contributor

Hi @tanvirSajib,

The problem you are experiencing may be due to a change in @wordpress/scripts version 28.0. Please see the following article:

JSX in WordPress 6.6 – Make WordPress Core

@gziolo
Copy link
Member

gziolo commented Jul 27, 2024

Yes, it’s the known issue. Duplicate of #62202. Thank you for the report 🙇🏻

@gziolo gziolo closed this as completed Jul 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Tool] WP Scripts /packages/scripts [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants