Init Cloudinary in Function failed

Hi team,

I am trying to create a function to control files in Cloudinary.
I tried to add the dependency both ways: Using package name / Upload .zip folder.
I got the same error when I init cloudinary in the function. I am not sure if I am doing something wrong… :sob:

exports = function(arg){

  console.log("Start");
  var cloudinary = require('cloudinary').v2

  return {arg: arg};
};``` 

Here is the error: 

ran at 1649305391531
took
error:
failed to execute source for ‘node_modules/cloudinary/cloudinary.js’: FunctionError: failed to execute source for ‘node_modules/cloudinary/lib/cloudinary.js’: FunctionError: failed to execute source for ‘node_modules/cloudinary/lib/uploader.js’: FunctionError: failed to execute source for ‘node_modules/proxy-agent/index.js’: FunctionError: failed to execute source for ‘node_modules/pac-proxy-agent/dist/index.js’: FunctionError: failed to execute source for ‘node_modules/get-uri/dist/index.js’: FunctionError: failed to execute source for ‘node_modules/get-uri/dist/file.js’: FunctionError: failed to execute source for ‘node_modules/fs-extra/lib/index.js’: FunctionError: failed to execute source for ‘node_modules/fs-extra/lib/fs/index.js’: TypeError: Cannot access member ‘native’ of undefined
at node_modules/fs-extra/lib/fs/index.js:92:12(123)

at require (native)
at node_modules/fs-extra/lib/index.js:12:9(19)

at require (native)
at node_modules/get-uri/dist/file.js:57:26(48)

at require (native)
at node_modules/get-uri/dist/index.js:24:38(43)

at require (native)
at node_modules/pac-proxy-agent/dist/index.js:19:41(24)

at require (native)
at node_modules/proxy-agent/index.js:30:29(68)

at optionalRequire (node_modules/cloudinary/lib/utils/index.js:1858:11(21))
at node_modules/cloudinary/lib/uploader.js:78:39(164)

at require (native)
at node_modules/cloudinary/lib/cloudinary.js:27:28(44)

at require (native)
at node_modules/cloudinary/cloudinary.js:18:28(45)
2 Likes

Can anyone help with this question ? :sob:

1 Like

I’m facing the same issue.
@Brett_Huang were you able to fix it? or any alternative?