workshopper / how-to-npm

A module to teach you how to module.
https://www.npmjs.com/package/how-to-npm
ISC License
1.09k stars 212 forks source link

Step 8 - "Publish" doesn't work on Windows 10. Localhost:15443 not responding #103

Open brentpayton opened 7 years ago

brentpayton commented 7 years ago

Step 8 consistently fails on Windows 10 but passes on MacOS. It appears that the local server on port 15443 has exited or otherwise isn't responding when this failure occurs.

npm-debug.log.txt

brentpayton commented 7 years ago

NPM version 4.1.2 Node version 6.9.4

watilde commented 7 years ago

Hello 👋

Thanks for reporting this. The port number is declared as hard cording, so I put a bug label on this issue.

$ grep -irl 15443 .
./assets/registry/wrappy/body.json
./lib/registry.js
./workshop-npmrc

As a solution, we have two options:

I will consider a better way, but I will be glad to support anyone including you if someone has an interest in working on this.

watilde commented 7 years ago

Nice package to create a patch with https://github.com/sindresorhus/get-port

ShadowRZ commented 7 years ago

But I got:

npm ERR! publish Failed PUT 404
npm ERR! code E404
npm ERR! 404 missing : @shadowrz/sample-npm-package
npm ERR! 404
npm ERR! 404  '@shadowrz/sample-npm-package' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2017-04-14T10_53_14_504Z-debug.log

@brentpayton @watilde EDIT: When I access registry over HTTP:

{"error":"missing"}
watilde commented 7 years ago

@ShadowRZ It seems a different issue. Could you please open another issue and share your npm-debug.log?

watilde commented 7 years ago

This issue was confirmed as a bug already as it's labelled. how-to-npm doesn't work if the user is using the same port number(15443).