Open erdostom opened 4 years ago
Looks the module is not successfully imported. But I haven't tried doing this use webpack How do you import chart.xkcd?
I import using import charts from 'chart.xkcd'
Something is wrong with the way the modules are exported. If I use the latest npm version the above import works fine, but master from this repo fails.
Can be replicated with
create-react-app test
(yarn global add create-react-app
if you don't have it)yarn add https://github.com/timqian/chart.xkcd
import charts from 'chart.xkcd'
in src/App.js
The build script is not executed when people install this package by yarn add https://github.com/timqian/chart.xkcd
, so there is no dist
in the installed package. One way to solve this is to change prepublishOnly
in package.json
to prepublish
or prepare
, that way the build step will be executed.
I'm trying to use the latest version (HEAD, not released) using Webpack and I get this error. Using the latest official npm release doesn't have this problem.