NPM install (Scoped Packages)

How to troubleshoot NPM problems

AuthorFullName__c
Patrick Russell
articleNumber
000004147
FirstPublishedDate
2018-11-13T23:41:52Z
lastModifiedDate
2021-09-27
VersionNumber
11
npm install @angular/cli
For scoped packages (@angular/router), npm install uses an encoded slash for the “/” between the scope and the package name. This will be displayed as %2f in your Artifactory request logs:
20180731002214|166|REQUEST|127.0.0.1|admin|GET|/api/npm/npm/@angular%2fcli|HTTP/1.1|200|0
20180731002214|190|REQUEST|127.0.0.1|admin|GET|/api/npm/npm/@angular/cli/-/cli-6.1.1.tgz|HTTP/1.1|200|128696

There are two (2) locations where the encoded slash may fail. The first is on the Artifactory JVM options (“-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true”), which has enables by default. The second is on reverse proxies. Artifactory’s self-generated reverse proxy settings have the correct configuration to keep the slash unencoded:
 ##The “/” in the proxy_pass line forces Nginx / Apache to not decode encoded characters
proxy_pass          http://localhost:8081/artifactory/;