I am get an export error when build test?

Viewed 553

When running tests in React with Enzyme, I am getting the following error:

"Error: Package subpath './lib/utils' is not defined by "exports" in ...\node_modules\cheerio\package.json."

Cheerio is a dependency of Enzyme. The file in question does exist in the node_modules directory as expected. This error seems to have started when updating Node.js locally from 12.16.1 to 16.15.1.

I am running: React: 17.0.2 Enzyme: 13.11.0 Node.js: 16.15.1

1 Answers
Related