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!

Support URL encoded NPM package names



  • We have an issue with a (popular) non-url-friendly package name:

    @angular/common

    When requesting this package at NPM.org the following url (as generated by NPM install) works:
    https://registry.npmjs.org/@angular%2Fcommon

    And this doesn't:
    https://registry.npmjs.org/@angular/fcommon

    When requesting the package in our (IIS hosted) ProGet server (names pacman) this doesn't work,
    http://pacman/npm/npm/@angular%2Fcommon

    but this does:
    http://pacman/npm/npm/@angular/common

    We fixed this by using an IIS rewrite rule:

    <rewrite>
        <rules>
            <rule name="Proget npm Resolve UrlEncode">
                <match url="^npm/(.+)/(.+)$" />
                <action type="Rewrite" url="/npm/{R:1}/{UrlDecode:{R:2}}" />
            </rule>
        </rules>
    </rewrite>
    

    Is smelling like either incorrect encoding/decoding at ProGets' part, do you agree?
    Please note: we are not using the integrated ProGet server.

    Product: ProGet
    Version: 4.7.6



  • Looks related to:
    http://inedo.com/support/questions/4680, but wasn't fixed in our case (we're running Version 4.7.6 (Build 5))



  • We of course can't reproduce it either...

    Something before it gets to proget is munging the url. But I guess we'll just add a string.replace to unescape %2f in the URL. it might help, shouldn't hurt.

    PG-763 in the next maintence release.



  • Unfortunately PG-763 has not resolved this.

    For instance: http://pacman/npm/npm/@angular%2Fplatform-browser could still not be obtained.


  • inedo-engineer

    On ProGet 4.7.9:

    $ npm install @angular/platform-browser --loglevel verbose
    npm info it worked if it ends with ok
    npm verb cli [ '/usr/bin/nodejs',
    npm verb cli   '/usr/bin/npm',
    npm verb cli   'install',
    npm verb cli   '@angular/platform-browser',
    npm verb cli   '--loglevel',
    npm verb cli   'verbose' ]
    npm info using npm@3.5.2
    npm info using node@v4.2.6
    npm verb request uri http://proget/npm/npm-test/@angular%2fplatform-browser
    npm verb request always-auth set; sending authorization
    npm info attempt registry request try #1 at 2:38:23 PM
    npm verb request id 6e455c4d3dbe2135
    npm http request GET http://proget/npm/npm-test/@angular%2fplatform-browser
    npm http 200 http://proget/npm/npm-test/@angular%2fplatform-browser
    npm verb headers { 'cache-control': 'private',
    npm verb headers   'content-type': 'application/json; charset=utf-8',
    npm verb headers   'content-encoding': 'gzip',
    npm verb headers   vary: 'Accept-Encoding',
    npm verb headers   server: 'Microsoft-IIS/10.0',
    npm verb headers   'x-ua-compatible': 'IE=edge',
    npm verb headers   'x-proget-version': '4.7.9.2',
    npm verb headers   'x-aspnet-version': '4.0.30319',
    npm verb headers   'x-powered-by': 'ASP.NET',
    npm verb headers   date: 'Thu, 06 Apr 2017 19:38:15 GMT',
    npm verb headers   'content-length': '11462' }
    npm verb get saving @angular/platform-browser to /home/ben/.npm/proget/npm/npm-test/_40angular_252fplatform-browser/.cache.json
    npm verb makeDirectory /home/ben/.npm creation not in flight; initializing
    npm verb cache add spec @angular/platform-browser
    npm verb addNamed "latest" is being treated as a dist-tag for @angular/platform-browser
    npm info addNameTag [ '@angular/platform-browser', 'latest' ]
    npm verb addNameTag registry:http://proget/npm/npm-test/@angular%2fplatform-browser not in flight; fetching
    npm verb get http://proget/npm/npm-test/@angular%2fplatform-browser not expired, no request
    npm verb addNamed "4.0.1" is a plain semver version for @angular/platform-browser
    npm verb addRemoteTarball http://proget/npm/npm-test/@angular/platform-browser/-/platform-browser-4.0.1.tgz not in flight; adding
    npm verb addRemoteTarball [ 'http://proget/npm/npm-test/@angular/platform-browser/-/platform-browser-4.0.1.tgz',
    npm verb addRemoteTarball   '4b9efbeb2fbb900de188743b988802d3aa2b33ff' ]
    npm info retry fetch attempt 1 at 2:38:24 PM
    npm info attempt registry request try #1 at 2:38:24 PM
    npm http fetch GET http://proget/npm/npm-test/@angular/platform-browser/-/platform-browser-4.0.1.tgz
    npm http fetch 200 http://proget/npm/npm-test/@angular/platform-browser/-/platform-browser-4.0.1.tgz
    npm verb addTmpTarball /tmp/npm-26991-a64070af/proget/npm/npm-test/_40angular/platform-browser/-/platform-browser-4.0.1.tgz not in flight; adding
    npm verb addTmpTarball already have metadata; skipping unpack for @angular/platform-browser@4.0.1
    npm verb afterAdd /home/ben/.npm/@angular/platform-browser/4.0.1/package/package.json not in flight; writing
    npm verb afterAdd /home/ben/.npm/@angular/platform-browser/4.0.1/package/package.json written
    npm verb makeDirectory /home/ben/.npm/_locks creation not in flight; initializing
    npm verb lock using /home/ben/.npm/_locks/staging-e45475a342ae353f.lock for /home/ben/npm_test/node_modules/.staging
    npm verb unbuild node_modules/.staging/@angular/platform-browser-688e40ec
    npm verb gentlyRm don't care about contents; nuking /home/ben/npm_test/node_modules/.staging/@angular/platform-browser-688e40ec
    npm verb tar unpack /home/ben/.npm/@angular/platform-browser/4.0.1/package.tgz
    npm verb tar unpacking to /home/ben/npm_test/node_modules/.staging/@angular/platform-browser-688e40ec
    npm verb gentlyRm don't care about contents; nuking /home/ben/npm_test/node_modules/.staging/@angular/platform-browser-688e40ec
    npm verb gentlyRm don't care about contents; nuking /home/ben/npm_test/node_modules/.staging/@angular/platform-browser-688e40ec/node_modules
    npm info lifecycle @angular/platform-browser@4.0.1~preinstall: @angular/platform-browser@4.0.1
    npm info linkStuff @angular/platform-browser@4.0.1
    npm verb linkBins @angular/platform-browser@4.0.1
    npm verb linkMans @angular/platform-browser@4.0.1
    npm info lifecycle @angular/platform-browser@4.0.1~install: @angular/platform-browser@4.0.1
    npm info lifecycle @angular/platform-browser@4.0.1~postinstall: @angular/platform-browser@4.0.1
    npm verb unlock done using /home/ben/.npm/_locks/staging-e45475a342ae353f.lock for /home/ben/npm_test/node_modules/.staging
    npm_test@1.0.0 /home/ben/npm_test
    ├── UNMET PEER DEPENDENCY @angular/common@4.0.1
    ├── UNMET PEER DEPENDENCY @angular/core@4.0.1
    └── @angular/platform-browser@4.0.1  extraneous
    
    npm WARN @angular/platform-browser@4.0.1 requires a peer of @angular/core@4.0.1 but none was installed.
    npm WARN @angular/platform-browser@4.0.1 requires a peer of @angular/common@4.0.1 but none was installed.
    npm WARN npm_test@1.0.0 No description
    npm WARN npm_test@1.0.0 No repository field.
    npm verb exit [ 0, true ]
    npm info ok 
    

    Are you getting something different?



  • Just to be sure, we use IIS to host ProGet, not the built-in server.

    Yes, I do, a 404 error is returned as HTML, which then could not be interpreted as JSON.

    This happens with packages containing characters which are changed when they are url-encoded, like: @angular/common. It looks like NPM determines the escapedname and uses that for requesting the package:

    From the error log:

    ...
    23 silly mapToRegistry using default registry
    24 silly mapToRegistry registry http://pacman/npm/npm/
    25 silly mapToRegistry data Result {
    25 silly mapToRegistry   raw: '@angular/common',
    25 silly mapToRegistry   scope: '@angular',
    25 silly mapToRegistry   escapedName: '@angular%2fcommon',
    25 silly mapToRegistry   name: '@angular/common',
    25 silly mapToRegistry   rawSpec: '',
    25 silly mapToRegistry   spec: 'latest',
    25 silly mapToRegistry   type: 'tag' }
    26 silly mapToRegistry uri http://pacman/npm/npm/@angular%2fcommon
    ...
    

    (pacman is where we host our Proget instance)

    The exception message and log itself:

    npm ERR! registry error parsing json
    npm ERR! registry error parsing json
    npm ERR! registry error parsing json
    npm ERR! registry error parsing json
    npm ERR! registry error parsing json
    npm ERR! registry error parsing json
    npm ERR! registry error parsing json
    npm ERR! registry error parsing json
    npm ERR! registry error parsing json
    npm ERR! registry error parsing json
    npm ERR! registry error parsing json
    npm ERR! registry error parsing json
    npm ERR! registry error parsing json
    npm ERR! registry error parsing json
    npm ERR! registry error parsing json
    npm ERR! Windows_NT 6.3.9600
    npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
    npm ERR! node v7.6.0
    npm ERR! npm  v4.1.2
    
    npm ERR! Unexpected token < in JSON at position 0
    npm ERR! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    npm ERR! <html xmlns="http://www.w3.org/1999/xhtml">
    npm ERR! <head>
    npm ERR! <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    npm ERR! <title>404 - File or directory not found.</title>
    npm ERR! <style type="text/css">
    npm ERR! <!--
    npm ERR! body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
    npm ERR! fieldset{padding:0 15px 10px 15px;}
    npm ERR! h1{font-size:2.4em;margin:0;color:#FFF;}
    npm ERR! h2{font-size:1.7em;margin:0;color:#CC0000;}
    npm ERR! h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
    npm ERR! #header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
    npm ERR! background-color:#555555;}
    npm ERR! #content{margin:0 0 0 2%;position:relative;}
    npm ERR! .content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
    npm ERR! -->
    npm ERR! </style>
    npm ERR! </head>
    npm ERR! <body>
    npm ERR! <div id="header"><h1>Server Error</h1></div>
    npm ERR! <div id="content">
    npm ERR!  <div class="content-container"><fieldset>
    npm ERR!   <h2>404 - File or directory not found.</h2>
    npm ERR!   <h3>The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.</h3>
    npm ERR!  </fieldset></div>
    npm ERR! </div>
    npm ERR! </body>
    npm ERR! </html>
    npm ERR!
    npm ERR!
    npm ERR! If you need help, you may report this error at:
    npm ERR!     <https://github.com/npm/npm/issues>
    
    npm ERR! Please include the following file with any support request:
    npm ERR!     D:\Users\Robert\Source\PROJECT\angular2\npm-debug.log
    

    Sidenote: Upon installation of the upgrade our web.config was overwritten



  • When using your exact command, same thing:

    0 info it worked if it ends with ok
    1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
    1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
    1 verbose cli   'install',
    1 verbose cli   '@angular/platform-browser',
    1 verbose cli   '--loglevel',
    1 verbose cli   'verbose' ]
    2 info using npm@4.1.2
    3 info using node@v7.6.0
    4 silly loadCurrentTree Starting
    5 silly install loadCurrentTree
    6 silly install readLocalPackageData
    7 silly fetchPackageMetaData @angular/platform-browser@2.1.2
    8 silly fetchNamedPackageData @angular/platform-browser
    9 silly mapToRegistry name @angular/platform-browser
    10 silly mapToRegistry scope (from package name) @angular
    11 verbose mapToRegistry no registry URL found in name for scope @angular
    12 silly mapToRegistry using default registry
    13 silly mapToRegistry registry http://pacman/npm/npm/
    14 silly mapToRegistry data Result {
    14 silly mapToRegistry   raw: '@angular/platform-browser',
    14 silly mapToRegistry   scope: '@angular',
    14 silly mapToRegistry   escapedName: '@angular%2fplatform-browser',
    14 silly mapToRegistry   name: '@angular/platform-browser',
    14 silly mapToRegistry   rawSpec: '',
    14 silly mapToRegistry   spec: 'latest',
    14 silly mapToRegistry   type: 'tag' }
    15 silly mapToRegistry uri http://pacman/npm/npm/@angular%2fplatform-browser
    16 verbose request uri http://pacman/npm/npm/@angular%2fplatform-browser
    17 verbose request no auth needed
    18 info attempt registry request try #1 at 10:59:09 AM
    19 verbose request id 244c86848da634f2
    20 http request GET http://pacman/npm/npm/@angular%2fplatform-browser
    21 http 404 http://pacman/npm/npm/@angular%2fplatform-browser
    22 verbose bad json <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    22 verbose bad json <html xmlns="http://www.w3.org/1999/xhtml">
    22 verbose bad json <head>
    22 verbose bad json <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    22 verbose bad json <title>404 - File or directory not found.</title>
    22 verbose bad json <style type="text/css">
    22 verbose bad json <!--
    22 verbose bad json body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
    22 verbose bad json fieldset{padding:0 15px 10px 15px;}
    22 verbose bad json h1{font-size:2.4em;margin:0;color:#FFF;}
    22 verbose bad json h2{font-size:1.7em;margin:0;color:#CC0000;}
    22 verbose bad json h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
    22 verbose bad json #header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
    22 verbose bad json background-color:#555555;}
    22 verbose bad json #content{margin:0 0 0 2%;position:relative;}
    22 verbose bad json .content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
    22 verbose bad json -->
    22 verbose bad json </style>
    22 verbose bad json </head>
    22 verbose bad json <body>
    22 verbose bad json <div id="header"><h1>Server Error</h1></div>
    22 verbose bad json <div id="content">
    22 verbose bad json  <div class="content-container"><fieldset>
    22 verbose bad json   <h2>404 - File or directory not found.</h2>
    22 verbose bad json   <h3>The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.</h3>
    22 verbose bad json  </fieldset></div>
    22 verbose bad json </div>
    22 verbose bad json </body>
    22 verbose bad json </html>
    23 error registry error parsing json
    24 verbose headers { 'content-type': 'text/html',
    24 verbose headers   server: 'Microsoft-IIS/8.5',
    24 verbose headers   'x-ua-compatible': 'IE=edge',
    24 verbose headers   'x-proget-version': '4.7.9.2',
    24 verbose headers   date: 'Mon, 10 Apr 2017 08:59:09 GMT',
    24 verbose headers   connection: 'close',
    24 verbose headers   'content-length': '1245' }
    25 silly get cb [ 404,
    25 silly get   { 'content-type': 'text/html',
    25 silly get     server: 'Microsoft-IIS/8.5',
    25 silly get     'x-ua-compatible': 'IE=edge',
    25 silly get     'x-proget-version': '4.7.9.2',
    25 silly get     date: 'Mon, 10 Apr 2017 08:59:09 GMT',
    25 silly get     connection: 'close',
    25 silly get     'content-length': '1245' } ]
    26 silly fetchPackageMetaData SyntaxError: Unexpected token < in JSON at position 0
    26 silly fetchPackageMetaData <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    26 silly fetchPackageMetaData <html xmlns="http://www.w3.org/1999/xhtml">
    26 silly fetchPackageMetaData <head>
    26 silly fetchPackageMetaData <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    26 silly fetchPackageMetaData <title>404 - File or directory not found.</title>
    26 silly fetchPackageMetaData <style type="text/css">
    26 silly fetchPackageMetaData <!--
    26 silly fetchPackageMetaData body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
    26 silly fetchPackageMetaData fieldset{padding:0 15px 10px 15px;}
    26 silly fetchPackageMetaData h1{font-size:2.4em;margin:0;color:#FFF;}
    26 silly fetchPackageMetaData h2{font-size:1.7em;margin:0;color:#CC0000;}
    26 silly fetchPackageMetaData h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
    26 silly fetchPackageMetaData #header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
    26 silly fetchPackageMetaData background-color:#555555;}
    26 silly fetchPackageMetaData #content{margin:0 0 0 2%;position:relative;}
    26 silly fetchPackageMetaData .content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
    26 silly fetchPackageMetaData -->
    26 silly fetchPackageMetaData </style>
    26 silly fetchPackageMetaData </head>
    26 silly fetchPackageMetaData <body>
    26 silly fetchPackageMetaData <div id="header"><h1>Server Error</h1></div>
    26 silly fetchPackageMetaData <div id="content">
    26 silly fetchPackageMetaData  <div class="content-container"><fieldset>
    26 silly fetchPackageMetaData   <h2>404 - File or directory not found.</h2>
    26 silly fetchPackageMetaData   <h3>The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.</h3>
    26 silly fetchPackageMetaData  </fieldset></div>
    26 silly fetchPackageMetaData </div>
    26 silly fetchPackageMetaData </body>
    26 silly fetchPackageMetaData </html>
    26 silly fetchPackageMetaData
    26 silly fetchPackageMetaData     at JSON.parse (<anonymous>)
    26 silly fetchPackageMetaData     at CachingRegistryClient.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-client\lib\request.js:239:23)
    26 silly fetchPackageMetaData     at Request._callback (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-client\lib\request.js:212:14)
    26 silly fetchPackageMetaData     at Request.self.callback (C:\Program Files\nodejs\node_modules\npm\node_modules\request\request.js:186:22)
    26 silly fetchPackageMetaData     at emitTwo (events.js:106:13)
    26 silly fetchPackageMetaData     at Request.emit (events.js:192:7)
    26 silly fetchPackageMetaData     at Request.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\request\request.js:1081:10)
    26 silly fetchPackageMetaData     at emitOne (events.js:96:13)
    26 silly fetchPackageMetaData     at Request.emit (events.js:189:7)
    26 silly fetchPackageMetaData     at IncomingMessage.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\request\request.js:1001:12)
    26 silly fetchPackageMetaData  error for @angular/platform-browser@2.1.2 SyntaxError: Unexpected token < in JSON at position 0
    26 silly fetchPackageMetaData <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    26 silly fetchPackageMetaData <html xmlns="http://www.w3.org/1999/xhtml">
    26 silly fetchPackageMetaData <head>
    26 silly fetchPackageMetaData <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    26 silly fetchPackageMetaData <title>404 - File or directory not found.</title>
    26 silly fetchPackageMetaData <style type="text/css">
    26 silly fetchPackageMetaData <!--
    26 silly fetchPackageMetaData body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
    26 silly fetchPackageMetaData fieldset{padding:0 15px 10px 15px;}
    26 silly fetchPackageMetaData h1{font-size:2.4em;margin:0;color:#FFF;}
    26 silly fetchPackageMetaData h2{font-size:1.7em;margin:0;color:#CC0000;}
    26 silly fetchPackageMetaData h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
    26 silly fetchPackageMetaData #header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
    26 silly fetchPackageMetaData background-color:#555555;}
    26 silly fetchPackageMetaData #content{margin:0 0 0 2%;position:relative;}
    26 silly fetchPackageMetaData .content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
    26 silly fetchPackageMetaData -->
    26 silly fetchPackageMetaData </style>
    26 silly fetchPackageMetaData </head>
    26 silly fetchPackageMetaData <body>
    26 silly fetchPackageMetaData <div id="header"><h1>Server Error</h1></div>
    26 silly fetchPackageMetaData <div id="content">
    26 silly fetchPackageMetaData  <div class="content-container"><fieldset>
    26 silly fetchPackageMetaData   <h2>404 - File or directory not found.</h2>
    26 silly fetchPackageMetaData   <h3>The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.</h3>
    26 silly fetchPackageMetaData  </fieldset></div>
    26 silly fetchPackageMetaData </div>
    26 silly fetchPackageMetaData </body>
    26 silly fetchPackageMetaData </html>
    26 silly fetchPackageMetaData
    26 silly fetchPackageMetaData     at JSON.parse (<anonymous>)
    26 silly fetchPackageMetaData     at CachingRegistryClient.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-client\lib\request.js:239:23)
    26 silly fetchPackageMetaData     at Request._callback (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-client\lib\request.js:212:14)
    26 silly fetchPackageMetaData     at Request.self.callback (C:\Program Files\nodejs\node_modules\npm\node_modules\request\request.js:186:22)
    26 silly fetchPackageMetaData     at emitTwo (events.js:106:13)
    26 silly fetchPackageMetaData     at Request.emit (events.js:192:7)
    26 silly fetchPackageMetaData     at Request.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\request\request.js:1081:10)
    26 silly fetchPackageMetaData     at emitOne (events.js:96:13)
    26 silly fetchPackageMetaData     at Request.emit (events.js:189:7)
    26 silly fetchPackageMetaData     at IncomingMessage.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\request\request.js:1001:12)
    27 silly rollbackFailedOptional Starting
    28 silly rollbackFailedOptional Finishing
    29 silly runTopLevelLifecycles Finishing
    30 silly install printInstalled
    31 verbose stack SyntaxError: Unexpected token < in JSON at position 0
    31 verbose stack <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    31 verbose stack <html xmlns="http://www.w3.org/1999/xhtml">
    31 verbose stack <head>
    31 verbose stack <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    31 verbose stack <title>404 - File or directory not found.</title>
    31 verbose stack <style type="text/css">
    31 verbose stack <!--
    31 verbose stack body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
    31 verbose stack fieldset{padding:0 15px 10px 15px;}
    31 verbose stack h1{font-size:2.4em;margin:0;color:#FFF;}
    31 verbose stack h2{font-size:1.7em;margin:0;color:#CC0000;}
    31 verbose stack h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
    31 verbose stack #header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
    31 verbose stack background-color:#555555;}
    31 verbose stack #content{margin:0 0 0 2%;position:relative;}
    31 verbose stack .content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
    31 verbose stack -->
    31 verbose stack </style>
    31 verbose stack </head>
    31 verbose stack <body>
    31 verbose stack <div id="header"><h1>Server Error</h1></div>
    31 verbose stack <div id="content">
    31 verbose stack  <div class="content-container"><fieldset>
    31 verbose stack   <h2>404 - File or directory not found.</h2>
    31 verbose stack   <h3>The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.</h3>
    31 verbose stack  </fieldset></div>
    31 verbose stack </div>
    31 verbose stack </body>
    31 verbose stack </html>
    31 verbose stack
    31 verbose stack     at JSON.parse (<anonymous>)
    31 verbose stack     at CachingRegistryClient.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-client\lib\request.js:239:23)
    31 verbose stack     at Request._callback (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-client\lib\request.js:212:14)
    31 verbose stack     at Request.self.callback (C:\Program Files\nodejs\node_modules\npm\node_modules\request\request.js:186:22)
    31 verbose stack     at emitTwo (events.js:106:13)
    31 verbose stack     at Request.emit (events.js:192:7)
    31 verbose stack     at Request.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\request\request.js:1081:10)
    31 verbose stack     at emitOne (events.js:96:13)
    31 verbose stack     at Request.emit (events.js:189:7)
    31 verbose stack     at IncomingMessage.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\request\request.js:1001:12)
    32 verbose cwd D:\Users\Robert\Source\PROJECT\angular2
    33 error Windows_NT 6.3.9600
    34 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "@angular/platform-browser" "--loglevel" "verbose"
    35 error node v7.6.0
    36 error npm  v4.1.2
    37 error Unexpected token < in JSON at position 0
    37 error <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    37 error <html xmlns="http://www.w3.org/1999/xhtml">
    37 error <head>
    37 error <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    37 error <title>404 - File or directory not found.</title>
    37 error <style type="text/css">
    37 error <!--
    37 error body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
    37 error fieldset{padding:0 15px 10px 15px;}
    37 error h1{font-size:2.4em;margin:0;color:#FFF;}
    37 error h2{font-size:1.7em;margin:0;color:#CC0000;}
    37 error h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
    37 error #header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
    37 error background-color:#555555;}
    37 error #content{margin:0 0 0 2%;position:relative;}
    37 error .content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
    37 error -->
    37 error </style>
    37 error </head>
    37 error <body>
    37 error <div id="header"><h1>Server Error</h1></div>
    37 error <div id="content">
    37 error  <div class="content-container"><fieldset>
    37 error   <h2>404 - File or directory not found.</h2>
    37 error   <h3>The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.</h3>
    37 error  </fieldset></div>
    37 error </div>
    37 error </body>
    37 error </html>
    38 error If you need help, you may report this error at:
    38 error     <https://github.com/npm/npm/issues>
    39 verbose exit [ 1, true ]

  • inedo-engineer

    Ok, I noticed that in your log, npm isn't authenticating. Is the anonymous user allowed to access the feed in ProGet?



Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation