We can reference NPM deps on Github like so:
"dependencies":{
"foo":"github.com/org/root#commit"
}
But I have a Git repo with multiple NPM libraries in it, like so:
root/
nodejs/
foo/
package.json
bar/
package.json
is there a way to install foo from this Github repo directly? Something like this?
"dependencies":{
"foo":"github.com/org/root/nodejs/foo#commit"
}
I tried installing using that url, and it didn't work, I got this error:
npm ERR! code ENOPACKAGEJSON npm ERR! package.json Non-registry package missing package.json: https://raw.githubusercontent.com/org/root/master/nodejs/foo/package.json. npm ERR! package.json npm can't find a package.json file in your current directory. npm ERR! A complete log of this run can be found in: npm ERR! /home/oleg/.npm/_logs/2018-12-05T09_15_28_666Z-debug.log
I also tried using raw.githubusercontent.com like so:
"dependencies":{
"foo":"raw.githubusercontent.com/org/root/nodejs/foo#commit"
}
And I got the same error. Surely this must be possible somehow?