I have Project and Component (both React based). Both are local and i do not want to publish them yet. I'm trying to include the Component into the Project by installing it with npm i
.
In case i try to install the Component from tarball npm i file:../component-1.0.0.tgz
(after npm pack
) everything works as expected.
In case i try to install it from the folder npm i file:../component
i get error at project start:
ModuleNotFoundError: Module not found: Error: Can't resolve 'react' in '/home/user/www/component/lib
React is the peer-dependency in the Component, obviously.
I want to modify the Component during the development of the Project. How can i install the Component from the folder?
Please do not suggest me to import Component from the source, this is important to not modify any line in the Project.