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 import @turf/difference #1833

Closed
SimonChatillon opened this issue Feb 14, 2020 · 9 comments · Fixed by #1860
Closed

cannot import @turf/difference #1833

SimonChatillon opened this issue Feb 14, 2020 · 9 comments · Fixed by #1860

Comments

@SimonChatillon
Copy link

I'm opening this issue #1684 again because it is still not fixed, I can't import @turf/difference with webpack because of the use of a *.mjs file as module.

@rowanwins
Copy link
Member

As mentioned in the other issue the workaround for the timebeing is to use 6.0.1 which should be functionally equivalent.

@vinayakkulkarni
Copy link

Yep. can confirm.. revert to 6.0.1 works!

-  "@turf/difference": "^6.0.2",
+  "@turf/difference": "6.0.1",

@evanstern
Copy link

How do I fix this if I'm not importing '@turf/difference' anywhere? I simply import from "@turf/turf" and this error is getting generated for me.

I'm using turf v5.1.6, from my package.json file:

"@turf/turf": "^5.1.6"

@mfedderly
Copy link
Collaborator

@evanstern would you mind trying "@turf/turf": "^6.2.0-alpha.2" and seeing if that works better? I'm hopefully going to be releasing that exact same thing as 6.2.0 soon.

@niyasrahman
Copy link

changed to @turf/difference": "6.0.1 works fine!

@MuhmmadZohaibImtiaz
Copy link

../node_modules/@turf/difference/index.mjs 50:20-33
"export 'diff' (imported as 'martinez') was not found in 'martinez-polygon-clipping'
How do I solve this.
turfIssue

@mfedderly
Copy link
Collaborator

@MuhmmadZohaibImtiaz please try again with turf 6.2.0.

@MuhmmadZohaibImtiaz
Copy link

@mfedderly tried and not resolved.
Screenshot from 2021-01-19 11-33-39

@mfedderly
Copy link
Collaborator

Can you just use all of the turf dependencies at 6.2.0? The earlier ones are pretty inconsistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants