react-d3-speedometer icon indicating copy to clipboard operation
react-d3-speedometer copied to clipboard

Vite Error: `(0 , _memoizeOne.default) is not a function`

Open Jiangultimo opened this issue 3 years ago • 1 comments

[email protected] [email protected]

when use

import ReactSpeedometer from 'react-d3-speedometer'

there is an error

Uncaught TypeError: (0 , _memoizeOne.default) is not a function
    at ../../react-d3-speedometer/dist/core/config/configure.js (configure.js:1)
    at __require2 (chunk-RDZ5XA5N.js?v=56225ce0:17)
    at ../../react-d3-speedometer/dist/core/render/index.js (index.js:1)
    at __require2 (chunk-RDZ5XA5N.js?v=56225ce0:17)
    at ../../react-d3-speedometer/dist/index.js (index.js:1)
    at __require2 (chunk-RDZ5XA5N.js?v=56225ce0:17)
    at dep:react-d3-speedometer:1

I downloaded the source code, and update the memoize-one to the lastest version use try-build to build a dist, link it to my project, still has the same error

Jiangultimo avatar Jun 01 '21 13:06 Jiangultimo

Hi @EtaJx,

I'm new to Vite, and I'm not sure if this is exactly related to vite or some missing es6 module importing problem of the build setup. I will update here once I found out the issue with vite setup.

palerdot avatar Jun 02 '21 03:06 palerdot