This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
Jest error: is-plain-obj: SyntaxError: Unexpected token 'export' #10523
Labels
type: bug
The issue/PR concerns a confirmed bug.
type: refactor
The issue/PR is related to refactoring.
Describe the bug
There is an issue with the current dependencies tree. If the
package-lock.json
andnode_modules
are deleted, and the dependencies are reinstalled, Jest will not be able to run tests anymore. This is the error:This is the output of the
npm ls is-plain-obj
. On the right, the dependencies tree with the current package-lock, on the left the dependencies tree with a new installation without package-lock.json.As you can see, the
@wordpress/data
package usesis-plain-obj@4.1.0
that contains the ES Module on a new installation.Searching online, I found this PR on Gutenberg repo. I think the best solution is to upgrade all the
@wordpress/*
dependencies. We should do this after the webpack 5 migration.To reproduce
Steps to reproduce the behavior:
package-lock.json
andnode-modules
.npm install
.npm run test
.Expected behavior
Unit tests should run.
The text was updated successfully, but these errors were encountered: