Reputation: 338
I'm working with private module that i created. they are stored into my private git server.
i set the dependencies for that modules successfully using :
"dependencies" :
{
"mymodule" : "git+ssh://[email protected]/myproject#mybranch"
}
now i interested in publishing new release of this module without committing manually this branch. Is that possible to use something like : npm --registry git+ssh://[email protected]/myproject#mybranch publish
in order to push my local update directly from where i used it to my branch ?
by the way the previous cmd return this error : in the next foo is the username i created with npm adduser
npm --registry "git+ssh://[email protected]/myproject#mybranch" publish
npm WARN package.json [email protected] No README.md file found!
npm http PUT git+ssh://[email protected]/foo
npm ERR! Error: Invalid protocol
npm ERR! at Request.init (/usr/local/lib/node_modules/npm/node_modules/requ/main.js:302:31)
npm ERR! at new Request (/usr/local/lib/node_modules/npm/node_modules/request/main.js:103:8)
npm ERR! at request (/usr/local/lib/node_modules/npm/node_modules/request/main.js:956:11)
npm ERR! at RegClient.makeRequest (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:208:13)
npm ERR! at RegClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:117:17)
npm ERR! at RetryOperation.attempt (/usr/local/lib/node_modules/npm/node_modules/retry/lib/retry_operation.js:56:8)
npm ERR! at RegClient.regRequest [as request] (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:114:13)
npm ERR! at RegClient.publish (/usr/local/lib/node_modules/npm/node_module/npm-registry-client/lib/publish.js:51:8)
npm ERR! at publish_ (/usr/local/lib/node_modules/npm/lib/publish.js:95:12)
npm ERR! at Array.1 (/usr/local/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
if someone know a solution to this problem or a clue , I'll really appreciate that.
Ostro
Upvotes: 0
Views: 1397
Reputation: 41
You've probably had an answer to this by now - so this is more for visitors.
After a period of headaches I've come to the conclusion the installing node modules from anything other than a registry causes more problems than it solves. I'm assuming that, like me, you're looking for an enterprise-ready workflow, rather than a quick fix.
The best thing I can suggest is to use this little gem --> https://github.com/rlidwka/sinopia
Running a local npm registry gives you much better npm integration.
The set-up I have is Sinopia backed by Git and connected using post-update hooks.
Give it a try =]
Upvotes: 1