snowpack failed to compile. 'debounce' is not exported by node_modules/debounce/index.js,
Tatametheus opened this issue · 6 comments
Tatametheus commented
react use measure is depended on debounce. I got error during the compile time.
snowpack failed to load node_modules/react-use-measure/dist/web.js
'debounce' is not exported by node_modules/debounce/index.js, imported by node_modules/react-use-measure/dist/web.js
stefandesu commented
I have a similar issue with Vite. Neither of these work:
import debounce from "debounce"
import { debounce } from "debounce"
import * as debounce from "debounce"
lannonbr commented
I modified the code in a package where this is used as such:
import { default as debounce } from "debounce"
And that at least compiled through snowpack
mashaal commented
This seems to break with https://esm.sh and deno as well...
TypeError: The requested module '/v43/debounce@1.2.1/deno/debounce.js' does not provide an export named 'debounce'
Pringels commented
Experiencing the same issue with Rollup
DominicLGit commented
Experiencing the same issue with Rollup
For rollup use plugin @rollup/plugin-commonjs
sindresorhus commented
import debounce from 'debounce'
should work fine.