Skip to content

Can import @turf packages as "npm imports" but not as "node imports" #1558

Closed Answered by mbostock
jamesscottbrown asked this question in Q&A
Discussion options

You must be logged in to vote

I have confirmed that this issue was fixed in Turf.js 7.0.0 and that currently imports of both @turf/turf and npm:@turf/turf work out of the box in recent versions of Framework (1.6.0+).

import * as turf from "npm:@turf/turf";
import * as turf from "@turf/turf";

We still recommend using npm imports over Node imports as npm imports do not require you to explicitly manage dependencies yourself.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@jamesscottbrown
Comment options

@mbostock
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by mbostock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants