Closed gabrielguilhoto closed 2 years ago
Hi @gabrielguilhoto , thank for creating pull requests. Could you provide which version do you use in your project? I just test by installing the lib by npm and the lib/*
is exists.
@dilidili which version do you mean? The npm
version? It is 7.21.0, although we use Yarn on our project. Or was it the react-drawing-board
version? The fork I used was based on the 0.3.6 version.
But the problem does not happen when installing the lib as a standalone project with npm
. It happens if I try to add the GitHub repo as a dependency on another project (for example, with yarn add https://github.com/dilidili/react-drawing-board
). If the package.json
on the lib is changed to have the prepare
script the problem stops happening.
@dilidili which version do you mean? The
npm
version? It is 7.21.0, although we use Yarn on our project. Or was it thereact-drawing-board
version? The fork I used was based on the 0.3.6 version.But the problem does not happen when installing the lib as a standalone project with
npm
. It happens if I try to add the GitHub repo as a dependency on another project (for example, withyarn add https://github.com/dilidili/react-drawing-board
). If thepackage.json
on the lib is changed to have theprepare
script the problem stops happening.
Got that thanks! I'll merge this PR.
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 onpackage.json
(see https://stackoverflow.com/a/57829251/12440938). After doing that, the fork could be successfully used.This PR fixes #21.