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

Cannot read properties of undefined (reading 'store') #63006

Open
mxvsh opened this issue Jul 1, 2024 · 0 comments
Open

Cannot read properties of undefined (reading 'store') #63006

mxvsh opened this issue Jul 1, 2024 · 0 comments
Labels
[Package] Core data /packages/core-data [Type] Bug An existing feature does not function as intended

Comments

@mxvsh
Copy link

mxvsh commented Jul 1, 2024

Description

Package @wordpress/core-data isn't working. It returns undefined when I try to import it in a TypeScript project.

Here's ny TSConfig

{
	"compilerOptions": {
		"jsx": "react-jsx",
		"module": "ESNext",
		"target": "ES2016",
		"strict": true,
		"allowSyntheticDefaultImports": true,
		"moduleResolution": "node"
	}
}

Step-by-step reproduction instructions

  1. Install @wordpress/core-data
  2. Add following code
import { store } from '@wordpress/core-data';
console.log('store', store);
  1. You should get an error.

Screenshots, screen recording, code snippet

Code:

Screenshot 2024-07-01 at 14 00 23

Result:

Screenshot 2024-07-01 at 13 58 04

Environment info

  • Wordpress Version: 6.5.5
  • I am building a custom theme (Clone of 2024)

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

@mxvsh mxvsh added the [Type] Bug An existing feature does not function as intended label Jul 1, 2024
@akasunil akasunil added the [Package] Core data /packages/core-data label Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Core data /packages/core-data [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants