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!

    Log in - npm commandline

    Scheduled Pinned Locked Moved Support
    authenticationprogetnpm
    4 Posts 1 Posters 40 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.
    • ? This user is from outside of this forum
      Guest
      last edited by

      I'm trying to run an npm install of one of our feeds, but keep getting blocked because of authentication issues

      $ npm install --registry=https://proget.css.rxweb-dev.com/npm-feeds/private-npm/exhibitor-list@0.0.6

      and I get an output of


      npm ERR! registry error parsing json

      npm ERR! Darwin 15.6.0

      npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--registry=https://proget.css.rxweb-dev.com/npm-feeds/private-npm/exhibitor-list@0.0.6"

      npm ERR! node v4.2.1

      npm ERR! npm v3.7.3

      npm ERR! Unexpected token <

      npm ERR! <!DOCTYPE html>

      npm ERR! <html>

      npm ERR! <head>

      npm ERR! <title>Log In</title>

      npm ERR!

      npm ERR! <link type="text/css" rel="stylesheet" href="/resources/InedoLibWeb/styles/common.css?416.1.0.0" />

      ................ etc etc.........

      <span class="info-block info" style="text-align: left">The page you are attempting to access requires authentication and you are currently browsing as the anonymous user.</span>..........


      I've tried playing with the ~/.npmrc file. So far I have:

      registry=https://proget.css.rxweb-dev.com/npm-feeds/private-npm/

      strict-ssl=false

      but when I try to add the username, password, email, on the commandline using npm adduser I get the following error:


      npm ERR! <html><head><title>Object moved</title></head><body>
      npm ERR!Object moved to <a href="/log-in?ReturnUrl=%2Fnpm-feeds%2Fprivate-npm%2F-%2Fuser%2Forg.couchdb.user%3Aci-aem-user">here</a>.
      npm ERR! </body></html>


      So it seems that I can't manage send through the credentials when I run the command
      Any help would be greatly appreciated

      Product: ProGet
      Version: 4.5.0

      1 Reply Last reply Reply Quote 0
      • ? This user is from outside of this forum
        Guest
        last edited by

        You're using the wrong url; you need to use the "API endpoint URL", not the URL from your web browser.

        Based on your command above, that would be...

        https://proget.css.rxweb-dev.com/npm/private-npm/
        
        1 Reply Last reply Reply Quote 0
        • ? This user is from outside of this forum
          Guest
          last edited by

          I tried that as well, but it also gives me the following error


          Unexpected token <

          npm ERR! <!DOCTYPE html>

          npm ERR! <html>

          npm ERR! <head>

          npm ERR! <title>Not Found</title>

          ....

          <p>
          npm ERR! You were taken to this page because ProGet encountered an error without a specific or known resolution.
          npm ERR! </p>


          So it seems it's not looking at the package.json which is

          {

          "name": "ui.apps",

          "version": "1.0.0",

          "scripts": {

          "test": "echo \"Error: no test specified\" && exit 1"
          

          },

          "dependencies": {

          "exhibitor-list": "0.0.6"
          

          }

          }

          1 Reply Last reply Reply Quote 0
          • ? This user is from outside of this forum
            Guest
            last edited by

            The URL must still be incorrect; the /npm endpoints will return JSON-based content, where as the errors shown is HTML-based body content (<!DOCTYPE html>...).

            You can use a tool like Fiddler to see precisely what URLs are being requested, and then hopefully diagnose/trace from there.

            1 Reply Last reply Reply Quote 0

            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