dilidili / react-drawing-board

demo
https://react-drawing-board-demo.dilidili.now.sh
MIT License
68 stars 21 forks source link

Repository fork can't be used as a dependency #21

Closed gabrielguilhoto closed 2 years ago

gabrielguilhoto commented 2 years ago

I forked the repository and added it as a dependency of another project, but I would get the following error message: Module not found: Error: Can't resolve 'react-drawing-board'. I found that was happening because the "compiled" files on the lib directory, such as plain JS and CSS files, were absent. Only the src directory, which had TypeScript and Less files, was present.

I found out that the problem could be solved if the library defined a prepare script on package.json (see https://stackoverflow.com/a/57829251/12440938). I'll open a PR with that change.