for the last day im struggling to use a git repository as a component.
i tried alot of approaches, and none of then worked when i type npm i
here is some approaches that i have tried:
npm install from Git in a specific version,
How to use private Github repo as npm dependency
Git repository to a dependency in package.json
Import component from a different repo
i created 2 rep in git hub:
main project => should consume the component
chocolate component => thats my component
every time i put this in my package.json (main project repo), i got that error:
"dependencies": {
"test-component": "IgorEstevao/test-component#master", # try 1
"test-component": "git://github.com/IgorEstevao/test-component.git#0.0.1", # try 2
"test-component": "git://github.com/IgorEstevao/test-component.git", # try 3...
}
npm ERR! premature close
How i use chocolate component in main project?
keep in mind in the future booth repositories gonna be private, so i think i will need to use github api key to access?