node-js-libs/curlrequest

getting error Uncaught (in promise) TypeError: Cannot read property 'apply' of undefined

nsharma1989 opened this issue · 1 comments

Hi I am using webpack with target: web

I see this error on running
var options = { url: url, method: method, insecure: ignoreSSL }; curl.request(options, function (err, response) { if (err) throw err; console.log(response); });

bundle.js:63366 Uncaught (in promise) TypeError: Cannot read property 'apply' of undefined at ./node_modules/curlrequest/spawn.js.module.exports (bundle.js:63366) at Object../node_modules/curlrequest/index.js.exports.request (bundle.js:63181) at bundle.js:107092 at step (bundle.js:107048) at Object.next (bundle.js:107029) at bundle.js:107023 at new Promise (<anonymous>) at ./service/Service.js.__awaiter (bundle.js:107019) at sendCurl (bundle.js:107084) at Object.<anonymous> (bundle.js:107186)

Thank you

Hi I just noticed that the command is running

curl --silent --show-error --no-buffer --globoff --url https://MYURL/api/v1/ --insecure --request GET --location --max-redirs 3 --header Accept: application/json --header Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 --header Accept-Language: en-US,en;q=0.8 --header Content-Type: application/json

but it still gives certificate errors even with the --insecure flag. Any solutions?