cancel
Showing results for 
Search instead for 
Did you mean: 

Install random NPMs

Former Member
0 Kudos

Hi,

I received an error during implementing NPM's squel:

npm ERR! 404 no such package available : squel

npm ERR! 404

npm ERR! 404 'squel' 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 'js'

npm ERR! 404

npm ERR! 404 Note that you can also install from a

npm ERR! 404 tarball, folder, http url, or git url.

But this package is official released yet:https://www.npmjs.com/package/squel

Even when I try to install it locally on my machine, all seems to be fine:

How to install random NPMs with SPS12 ? I have no access to our linux Server - just to the WebIDE.

Thank you in advance!

Accepted Solutions (1)

Accepted Solutions (1)

draschke
Active Contributor
0 Kudos

Hi,

I could install directly on the XSA Client the missing npm squel package.

Do I've to do something more to consume it within the WebIDE?

Even after I could install it through the client, I get the same error:

npm ERR! node v4.4.0

npm ERR! npm v2.14.20

npm ERR! code E404

XSA Client

npm install squel@4.4.1

Former Member
0 Kudos

Hi Dirk,

Any chance you can attach your node.js module (or some example using the module you want)?

Thanks,

Omer.

draschke
Active Contributor
0 Kudos

I could install this squel npm with the XSA Client successfully, but somebody told me, I've to push it, otherwise it'll be only local on my computer. Is that true?

(I can't check it at this moment.)

So, now I tried to push (xs push) it, but I don't know how. And I'm not sure that is necessary.

As I said, I could execute this command - npm install squel@4.4.1 - successfully on the Client, but I'm still not able to build it.

draschke
Active Contributor
0 Kudos

Me again.

Found this link with the same problem, but this solution wasn't helpful for us.

configure the HTTP and HTTPS proxy for Node.js:

npm config set proxy http://proxy:8080

npm config set https-proxy http://proxy:8080

New Hana DB and XSA revision

Even after we have installed the new runtime version 1.0.28. we are struggling with the same problem.

I guess we have to open up a ticket...:(

Former Member
0 Kudos

I guess so.

Did you try the trick with:

xs set-env di-local-npm-registry NO_PROXY <short hostname>?


If that doesn't work then a ticket is the way to go.


Regards,

Omer.

draschke
Active Contributor
0 Kudos

Hi Omer,

tried now all NO_PROXY combination, but don't get it fixed.

But I'm wondering. As I said before, I can do an install on the xsa client side, but there is no impact in the webide? Did I miss a step?

draschke
Active Contributor
0 Kudos

After all we found out, that we used the the wrong url (https instead http), because the documentation was not quite right at this point.

This solved our problem:

UPSTREAM_LINK "http://registry.npmjs.org/"

And also very important: Only the hostname worked!

All other combinations, i.e. host.domain.com and so on, failed.

NO_PROXY "host"

Ajinkya_Jadhav
Participant
0 Kudos

Hi Dirk,

We are getting similar error while building the node module.

Can you answer my Question?

https://answers.sap.com/questions/12732400/npm-err-404-not-found.html

Please check the question for more details on the issue.

It would be great if you help us out on this issue.

Thanks

Best Regards,

Ajinkya Jadhav

Answers (1)

Answers (1)

draschke
Active Contributor
0 Kudos

Tried the same npm to install and get the same error.

I'm wondering too, because I thought the system will call this npm if its not inside of the cache?

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

When you installed the Web IDE what did you configure in the di-local-npm-registry section of the sap-xsac-di*.mtaext file? This is where you must configure the UPSTREAM_LINK and proxy settings for your environment.  Even if you set the UPSTREAM_LINK or let it default to registry.npmjs.org; it might not be able to connect if your system is inside a corporate network and needs proxy/firewall settings.  You can look at the logs of the di-local-npm-registry to see what errors you might be getting.  You can check these settings by doing an xs env di-local-npm-registry.  You can try changing the settings with set-env but you must restage and restart the di-local-npm-registry afterwards.

draschke
Active Contributor
0 Kudos

Thanks Thomas, I'll check for it.

draschke
Active Contributor
0 Kudos

I think we missed all this steps and even more the certificate seems to be necessary.

Does it mean we have to install the whole xs install the DI CORE incl. the mtaext again?

            sap_xsac_di_-core-xxx.zip -e sap-xsac-di-3.12.7.mtaext

And also the WebIDE?

Thanks for your help!

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

The individual parameters can be changed via xs set-env; but if you missed them all the easiest solution might be to reinstall instead.

draschke
Active Contributor
0 Kudos

Yes, I would like to prefer only to set the parameter via xs set-env, because I'm afraid the we'll get in trouble, if we would reinstall all of that. But with the certificate it seems so, that we've to do it.

My biggest problem is, that, when I look to the env, I can see that we installed the version 3.12.8. in default. But if I look to the notes, there is a mtaext file for version 3.12.7.

So, if I would use this 3.12.7. mtaext file for my reinstallation of DI CORE, what does would mean?

env:

MTA_METADATA:

   {

     "id": "com.sap.devx.di",

     "version": "3.12.8"

   }

notes:

https://launchpad.support.sap.com/#/notes/2304873/E

sap-xsac-di-3.12.7.mtaext

Former Member
0 Kudos

the 3.12.7 mtaext file should work fine with the 3.12.8 DevX SCV's.

Regards,

Omer.

draschke
Active Contributor
0 Kudos

Thanks Omer, will give it a try.

draschke
Active Contributor
0 Kudos

Please, could someone help with setting the values.

For example, if I would like to set the url for UPSTREAM_LINK:

Would this be right way?

xs set-env di-local-npm-registry UPSTREAM_LINK https://registry.npmjs.org/


USAGE:

   xs set-env APP NAME VALUE

ARGUMENTS:

   APP       The name of the app

   NAME      The environment variable to set

   VALUE     The new value for the variable

checking the env:

xs env di-local-npm-registry

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Yes that looks right. Don't forget that you have to do the RESTAGE and RESTART of the service for the change to take effect.

draschke
Active Contributor
0 Kudos

Thomas, thanks for this hint!

I could set all the values, restaged and restarted the app, but when I build the app there is no difference.

The variables are looking fine.


But the error messages is still the same.


npm http request GET https://dummy:51007/squel

npm http 404 https://dummy:51007/squel

npm ERR! Linux 3.0.101-71-default

npm ERR! argv "/dummy/usr_sap/CH2/xs/ea_data/dummy/executionroot/30579e17-48ff-49ae-bce2-da5f0ba05b83/app/resources/nodejs/vendor/node4.4/bin/node_main/node" "/dummy/usr_sap/xxx/xs/ea_data/dummy/executionroot/30579e17-48ff-49ae-bce2-da5f0ba05b83/app/resources/nodejs/vendor/node4.4/lib/node_modules/npm/bin/npm-cli.js" "install" "--registry" "https://dummy:51007" "-d"

npm ERR! node v4.4.0

npm ERR! npm v2.14.20

npm ERR! code E404

npm ERR! 404 no such package available : squel

npm ERR! 404

npm ERR! 404 'squel' 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 'tinyjs'

npm ERR! 404

npm ERR! 404 Note that you can also install from a

npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! Please include the following file with any support request:

npm ERR! /HANA/usr_sap/CH2/xs/ea_data/dummy/executionroot/30579e17-48ff-49ae-bce2-da5f0ba05b83/app/tomcat/temp/builder/sap.nodejs/builds/build-767109958341041024/tinyjs/npm-debug.log

Any ideas?








draschke
Active Contributor
0 Kudos

Seems to be a proxy issue:

02.07.16 18:54:59.000 [RTR] OUT    127.0.0.1 - - to dummy:51007 "GET /squel H

TTP/1.1" 404 sent 43 in 52 by 004-76c31eb6-ca97-4cb5-9439-d2e0ca2b8c5e

02.07.16 18:54:59.492 [APP/368575-0] OUT     http  --> ERR, req: 'GET https://re

gistry.npmjs.org/squel', error: tunneling socket could not be established, cause

=Parse Error

Used this:

   xs set-env di-local-npm-registry UPSTREAM_LINK "https://registry.npmjs.org/"

   xs set-env di-local-npm-registry HTTP_PROXY "http_proxy=http://proxy....:8080"

   xs set-env di-local-npm-registry HTTPS_PROXY "http_proxy=http://proxy.....:8080"

   xs set-env di-local-npm-registry NO_PROXY: ........

What does that mean?

npm ERR! 404 Note that you can also install from a

npm ERR! 404 tarball, folder, http url, or git url.

Could I download the npm by myself and install it.

(Only for this case, if we don't get this proxy issue fixed)

Former Member
0 Kudos

Hi Dirk,

I once saw an issue which is related to the proxy server due to a network configuration of the machine.

Several things you may want to test:

set the proxy variables in a bash environment (on the machine running XSA) and run:

curl <url of the npm module in registry.npmjs.org>

If you are able to run the curl command then maybe the problem is with the NO_PROXY variable.

Make sure the value of the NO_PROXY command is the result of running:
hostname

and:

hostname -f

If that doesn't work I guess a support ticket is in order.

Hope this helps.

Regards,

Omer.

draschke
Active Contributor
0 Kudos

Hi Omer,

will try it asap and give feedback to you.

(Need to ask our admin.)

Maybe it comes from npm...

npm update fails when http link to tarball is specified in dependencies · Issue #9531 · npm/npm · Gi...

How can I check which node version we are using?

Thanks a lot!

Former Member
0 Kudos

You can run "xs runtimes"

I think SP12 machines are running node 4.4.

Regards,

Omer.

draschke
Active Contributor
0 Kudos

Thanks Omer,

you are right, it's version 4.4.

It could be a problem with npm v2.14.2, which we do have.

Do we able to change the npm version?

Thanks!

Former Member
0 Kudos

Not sure, you might be able to install a different node runtime (see "xs help create-runtime") and then define in your package.json that you wish to use it (https://docs.npmjs.com/files/package.json#engines)

Regards,

Omer.

draschke
Active Contributor
0 Kudos

Hi Omer,

nice idea, but the XSA seems to be doesn't care about it.

I tried different values, but get always the same npm error with the same npm version.

npm ERR! node v4.4.0

npm ERR! npm v2.14.20

npm ERR! code E404

{

"engines" : { "npm" : "~2.13." } ,

  "dependencies": {

  "sap-xsenv": "1.2.2",

  "sap-xsjs": "1.6.4",

  "squel": "4.4.1"

  },

  "description": "",

  "devDependencies": {

  "sap-xsjs-test": "1.0.7"

  },

  "files": [],

  "main": "server.js",

  "name": "tinyjs",

  "scripts": {

  "start": "node server.js",

  "test": "node testrun.js"

  },

  "version": "1.0.0"

}

Former Member
0 Kudos

Did you install the node runtime which you want in XSA?

Regards,

Omer.

draschke
Active Contributor
0 Kudos

It's really nice to know, that I'm able to change the node runtime, but at this moment I don't see a reason to do it.

The error comes from npm and an older version of it should fix this this issue.

Or do I've to do more within XSA to get this engine value to work?