Installing an npm package from a fork using yarn + webpack is impossible to solve. / Dist /

I want to contribute to the open source React component, and I would like to use the project fork in my web package.

I use yarn and I tried to install my fork using

yarn add github:Startouf/react-coverflow

However, when webpack tries to compile my package, it causes strange errors

ERROR in ./~/react-coverflow/main.js
Module not found: Error: Can't resolve './dist/react-coverflow' in '/Users/Cyril/dev/MyApp/client/node_modules/react-coverflow'

Did I miss something?

EDIT: when I use the released package from npm, the node module folder contains

LICENSE     README.md   dist        main.js     package.json

When I use my plug, it seems that the project is not compiled and contains

LICENSE         README.md       package.json        src         webpack.config.js
Makefile        main.js         site            test

It seems like I'm missing a step ... Although I add yarn with a github fork, I automatically created a release, but it seems like I'm wrong?

+5
2

, . , , , dist. npm.

:

  • ( )
  • , . npm .

: npm issue

+4

Source: https://habr.com/ru/post/1674817/


All Articles