Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    npm publish failing after changing url

    Scheduled Pinned Locked Moved Support
    3 Posts 2 Posters 11 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T Offline
      thomas.philips_3206
      last edited by

      Hi, im trialing proget locally on my machine, it installed with the default localhost:8624. I tried changing this url with the inedo hub configuration page but every time i click save the urls box just goes red and nothing is changed.

      instead, i altered the binding in iis manually, and found C:\ProgramData\Inedo\SharedConfig\ProGet.Config and updated that as well

      the website is working correctly on the new url, and npm install with the npm feed i set up works

      but whenever i try to publish, the npm client it fails as it is still trying to access the old localhost:8624 address, even though i've set the registry to the new address:

      <redacted> > npm --registry http://local.proget.net/npm/private-npm/ publish
      npm notice
      npm notice package: @<redacted>@1.0.11
      npm notice === Tarball Contents ===
      npm notice 169B index.js
      npm notice 557B package.json
      npm notice 329B readme.md
      npm notice 78B  readme.template.md
      npm notice === Tarball Details ===
      npm notice name:          @<redacted>
      npm notice version:       1.0.11
      npm notice package size:  777 B
      npm notice unpacked size: 1.1 kB
      npm notice shasum:        4c7b63635e1805bf0f8a0b95b469c11788e65468
      npm notice integrity:     sha512-236SSsDjj2Ll5wxodSscT16/EQ==
      npm notice total files:   4
      npm notice
      npm ERR! code ECONNREFUSED
      npm ERR! errno ECONNREFUSED
      npm ERR! FetchError: request to http://localhost:8624/npm/private-npm/@<redacted> failed, reason: connect ECONNREFUSED 127.0.0.1:8624
      npm ERR!     at ClientRequest.<anonymous> (C:\Users\<redacted>\AppData\Roaming\npm\node_modules\npm\node_modules\node-fetch-npm\src\index.js:68:14)
      npm ERR!     at ClientRequest.emit (events.js:209:13)
      npm ERR!     at Socket.socketErrorListener (_http_client.js:406:9)
      npm ERR!     at Socket.emit (events.js:209:13)
      npm ERR!     at emitErrorNT (internal/streams/destroy.js:91:8)
      npm ERR!     at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
      npm ERR!     at processTicksAndRejections (internal/process/task_queues.js:80:21)
      npm ERR!  FetchError: request to http://localhost:8624/npm/private-npm/@<redacted> failed, reason: connect ECONNREFUSED 127.0.0.1:8624
      npm ERR!     at ClientRequest.<anonymous> (C:\Users\<redacted>\AppData\Roaming\npm\node_modules\npm\node_modules\node-fetch-npm\src\index.js:68:14)
      npm ERR!     at ClientRequest.emit (events.js:209:13)
      npm ERR!     at Socket.socketErrorListener (_http_client.js:406:9)
      npm ERR!     at Socket.emit (events.js:209:13)
      npm ERR!     at emitErrorNT (internal/streams/destroy.js:91:8)
      npm ERR!     at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
      npm ERR!     at processTicksAndRejections (internal/process/task_queues.js:80:21) {
      npm ERR!   message: 'request to http://localhost:8624/npm/private-npm/@<redacted> failed, reason: connect ECONNREFUSED 127.0.0.1:8624',
      npm ERR!   type: 'system',
      npm ERR!   errno: 'ECONNREFUSED',
      npm ERR!   code: 'ECONNREFUSED',
      npm ERR!   stack: 'FetchError: request to http://localhost:8624/npm/private-npm/@<redacted> failed, reason: connect ECONNREFUSED 127.0.0.1:8624\n' +
      npm ERR!     '    at ClientRequest.<anonymous> (C:\\Users\\<redacted>\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-fetch-npm\\src\\index.js:68:14)\n' +
      npm ERR!     '    at ClientRequest.emit (events.js:209:13)\n' +
      npm ERR!     '    at Socket.socketErrorListener (_http_client.js:406:9)\n' +
      npm ERR!     '    at Socket.emit (events.js:209:13)\n' +
      npm ERR!     '    at emitErrorNT (internal/streams/destroy.js:91:8)\n' +
      npm ERR!     '    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)\n' +
      npm ERR!     '    at processTicksAndRejections (internal/process/task_queues.js:80:21)'
      npm ERR! }
      npm ERR!
      npm ERR! If you are behind a proxy, please make sure that the
      npm ERR! 'proxy' config is set properly.  See: 'npm help config'
      
      npm ERR! A complete log of this run can be found in:
      npm ERR!     C:\Users\<redacted>\AppData\Roaming\npm-cache\_logs\2020-06-17T11_23_37_360Z-debug.log
      
      1 Reply Last reply Reply Quote 0
      • atrippA Offline
        atripp inedo-engineer
        last edited by

        Hello;

        The InedoHub just edits that ProGet.Config file; but in any case, those bindings are only used for the integrated web server, not IIS. We should definitely improve that experience so it's clearer. Are you able to access your instance via http://local.proget.net/ in a browser? If so, then, it seems to have worked.

        I don't know npm very well, but I looked at the docs of [npm publish](https://docs.npmjs.com/cli/publish), and it seems that --registry isn't an option on that page. But there's also this page: https://docs.npmjs.com/misc/registry

        Hope that helps

        T 1 Reply Last reply Reply Quote 0
        • T Offline
          thomas.philips_3206 @atripp
          last edited by

          @atripp --registry is just the global arg for swapping out your registry on a per-command basis (instead of in a config file).

          But! i just realised what was wrong, apologies it's all on me. I still had the old url hardcoded in the publishConfig.registry key in the test modules package.json. i didn't realise that would make npm completely ignore the --registry arg, and blindly try and publish to the old registry address! which was why npm install etc were all working totally fine

          1 Reply Last reply Reply Quote 1

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • 1 / 1
          • First post
            Last post
          Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation