Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port appears to be ignored - perhaps not here in npm_lazy though #62

Open
kylecordes opened this issue Apr 1, 2016 · 3 comments
Open

Comments

@kylecordes
Copy link

I have set npm_lazy to a different port:

npm_lazy -p 3333

... because port 8080 is about the worst possibly choice for me, I nearly always have some other application under development listening on that port. To match that from NPM, I use:

npm config set registry http://localhost:3333/

Then I npm cache clean, rm -rf node_modules, npm install. It works for the first dozen or two packages, downloading successfully. I see them mentioned in the npm_lazy output. Then after a while, errors like so:

npm WARN retry will retry, error on last attempt: Error: connect ECONNREFUSED 127.0.0.1:8080
npm ERR! fetch failed http://localhost:8080/bootstrap/-/bootstrap-3.3.6.tgz
npm WARN retry will retry, error on last attempt: Error: connect ECONNREFUSED 127.0.0.1:8080
npm ERR! fetch failed http://localhost:8080/rxjs/-/rxjs-5.0.0-beta.2.tgz
npm WARN retry will retry, error on last attempt: Error: connect ECONNREFUSED 127.0.0.1:8080
npm ERR! fetch failed http://localhost:8080/venn.js/-/venn.js-0.2.7.tgz
npm WARN retry will retry, error on last attempt: Error: connect ECONNREFUSED 127.0.0.1:8080
npm ERR! fetch failed http://localhost:8080/es6-shim/-/es6-shim-0.35.0.tgz
npm WARN retry will retry, error on last attempt: Error: connect ECONNREFUSED 127.0.0.1:8080

This output is from NPM - not from npm_lazy. Still, this seems like the best place to initially report the issue. It appears something behind the scenes insists on using 127.0.0.1:8080, even though I never set that as a registry, never ran npm_lazy on 8080, etc.

It is possible there is some code deep inside npm_lazy that isn't using the -p port setting, but assuming 8080?

@kylecordes
Copy link
Author

Or similarly, does -p not do the whole job? Do I also need to set externalUrl to successfully work on a port other than 8080?

@mixu
Copy link
Owner

mixu commented Apr 1, 2016

yeah you also need to set externalUrl, though I think from a UX perspective it would make more sense if the two were connected by default. The -p option landed quite recently https://github.com/mixu/npm_lazy/pull/58/files

@kylecordes
Copy link
Author

I got past that problem with the external URL setting, thanks.

Then I had another problem: tgzs were not being fetched at all. I found I had to also delete my globally installed NPM modules, then things work as expected. Perhaps that should be in the read me also?

Getting back to the port, it seems to me that 8080 is not a great default - many other developers are likely to be using that for other purposes already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants