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



  • 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



  • 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/


  • 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"
    

    }

    }



  • 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.



Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation