-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Get an Error About export #2547
Comments
Seems like you are using a deep import of |
Getting this too:
|
Enzyme uses a deep import lib/utils (https://github.com/enzymejs/enzyme/blob/master/packages/enzyme/src/Utils.js#L11), so Enzyme and libraries built on Enzyme are failing due to this. The second Enzyme issue seems to imply that no immediate fix is coming from Enzyme to correct their import, so it may be easier and faster to add |
My error should be enzyme too |
I think so. Seem Enzyme didn't updated any release and it is working right when we use cheerio 1.0.0-rc.10. I think cheerio should be backward compatibility |
It seems to have the same cause as #2545 |
I am also getting the same issue. Because of enzyme;s deep link dependency, build is failing with this error " |
@nnegi79 I think I'll lock 1.0.0-rc.10 |
We have the same sort of error:
but IIUC @fb55 is telling us, "We changed some private implementation details in the latest release, but that shouldn't matter if you consume our public exports, which did not change. Enzyme must rely on some of the private implementation details that we changed." IOW, "Cheerio isn't broken, Enzyme is (and always was, we just didn't know until now)." |
@zburke The truth is that I didn't know about enzyme's dependency when adding As enzyme recommends users stay with |
a temporary solution for this case : //edit node_modules/cheerio/package.json
...
"exports": {
".": {
"require": "./lib/index.js",
"import": "./lib/esm/index.js"
},
"./lib/slim": {
"require": "./lib/slim.js",
"import": "./lib/esm/slim.js"
},
"./lib/utils": {
"require": "./lib/utils.js",
"import": "./lib/esm/utils.js"
}
},
... |
In case someone looking for solution. You should lock
|
Also, fixed the jest tests by locking the version of `cheerio` cheeriojs/cheerio#2547 (comment)
Also, fixed the jest tests by locking the version of `cheerio` cheeriojs/cheerio#2547 (comment)
The Error is
× ERROR: Package subpath './lib/utils' is not defined by "exports" in D:\Jenkins\workspace\app\node_modules\cheerio\package.json
The text was updated successfully, but these errors were encountered: