apache / openwhisk-runtime-nodejs

Apache OpenWhisk Runtime NodeJS supports Apache OpenWhisk functions written in JavaScript for NodeJS
https://openwhisk.apache.org/
Apache License 2.0
60 stars 72 forks source link

Shall we add requests to the default packages for nodejs:10? #142

Closed jiangpengcheng closed 5 years ago

jiangpengcheng commented 5 years ago

there are three official actions which use the request package in https://github.com/apache/incubator-openwhisk-catalog

but cannot found such package while invoke these actions:

    "response": {
        "result": {
            "error": "Initialization has failed due to: Error: Cannot find module 'request'\n    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)\n    at Function.Module._load (internal/modules/cjs/loader.js:508:25)\n    at Module.require (internal/modules/cjs/loader.js:637:17)\n    at require (internal/modules/cjs/helpers.js:22:18)\n    at eval (eval at evalScript (/nodejsAction/runner.js:180:16), <anonymous>:4:15)\n    at eval (eval at evalScript (/nodejsAction/runner.js:180:16), <anonymous>:175:14)\n    at evalScript (/nodejsAction/runner.js:180:16)\n    at NodeActionRunner.init (/nodejsAction/runner.js:67:35)\n    at doInit (/nodejsAction/src/service.js:166:14)\n    at initCode (/nodejsAction/src/service.js:93:24)"
        },
        "status": "action developer error",
        "success": false
    }
rabbah commented 5 years ago

can we use needle instead? that should be available in all the node runtimes iirc. see https://github.com/request/request/issues/3142.

jiangpengcheng commented 5 years ago

great, it will be better

jiangpengcheng commented 5 years ago

closed as resolved