Skip to Content
Author's profile photo Andrew Lunde

XS-Advanced NodeJS UpStream Registry

I work on the Startup.Focus team and was recently helping a startup with their NodeJS development.

They wanted to include some public NodeJS modules but were running into package not found issues.


npm ERR! 404 no such package available : node_pkg
npm ERR! 404
npm ERR! 404 ‘node_pkg’ is not in the npm registry.

 

I knew this was an issue with the default configuration of the di-local-npm-registry and wanted to have a nice way to explain the how and why of changing it to search the public registry.

 

I ended up creating an example project to illustrate the issues and reasoning behind the fix.

 

https://bitbucket.org/alunde/mta_upstream_registry

 

If you are running into similar issues, please take a git->clone the project into your server and build/run the web module for more information.

 

Hope this helps someone out there.

 

-Andrew

Assigned tags

      11 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Witalij Rudnicki
      Witalij Rudnicki

      Hi Andrew. You made me asking another question: what is Bitbucket good for? Thanks!

      Author's profile photo HP Seitz
      HP Seitz

      Hi Witaliy,

      BitBucket has one advantage in comparison to GitHub, you do not have to pay for private git repos. Private Repos are also free at BitBucket.

      Cheers, HP

      Author's profile photo Former Member
      Former Member

      It really helped. Thanks a lot!!

      So, where would I find such information in SAP documentation ?

      Author's profile photo Thomas Jung
      Thomas Jung

      https://help.sap.com/viewer/1a8e7ab05a2e4119b02b702f211422f5/2.0.03/en-US/5fd9473b7e994e2aa66092da5a10c75a.html

       

      Author's profile photo Ajinkya Jadhav
      Ajinkya Jadhav

      Can't Find the mentioned URL.

       

      Author's profile photo Thomas Jung
      Thomas Jung

      Its moved from the HANA Developer Guide into its own separate guide. Here is the new URL: https://help.sap.com/viewer/292437fbf7794e2cb0d323b19a38285c/SAPWEBIDE4HANA/en-US/5fd9473b7e994e2aa66092da5a10c75a.html

      Author's profile photo Ajinkya Jadhav
      Ajinkya Jadhav

      Thank You

      Author's profile photo Ajinkya Jadhav
      Ajinkya Jadhav

      Hi,

      Getting following error while building remote module.

      npm ERR! node v6.15.1npm ERR! npm  v3.10.10npm ERR! code E404
      npm ERR! 404 no such package available : get-age
      npm ERR! 404 
      npm ERR! 404  'get-age' is not in the npm registry.
      npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
      npm ERR! 404 It was specified as a dependency of 'remote'
      npm ERR! 404 npm ERR! 404 Note that you can also install from a
      npm ERR! 404 tarball, folder, http url, or git url.
      Author's profile photo Andrew Lunde
      Andrew Lunde
      Blog Post Author

      Did you follow the manual steps in the repository README?

       

      xs login -u XSA_ADMIN   
      
      xs target -s SAP
      
      xs set-env di-local-npm-registry UPSTREAM_LINK http://registry.npmjs.org/
      
      xs restage di-local-npm-registry
      
      xs restart di-local-npm-registry
      
      xs env di-local-npm-registry | grep UPSTREAM_LINK
      
      
      Author's profile photo Ajinkya Jadhav
      Ajinkya Jadhav

      Hi Andrew,

      Can I setup the UPSTREAM_LINK only for my project in WebIDE itself?

      If yes, how can I do that?

       

      Author's profile photo Daniel Liu
      Daniel Liu

      Hi Andrew,

      This is great info and I followed this to solve the issue.

      Thanks,

      Daniel