Git Product home page Git Product logo

Comments (27)

cloudinary-pkoniu avatar cloudinary-pkoniu commented on June 10, 2024 8

Hi everyone!

Please checkout the newest release, I removed the proxy-agent and replaced it with native https.Agent module. It should fix all your warnings and errors that you're experiencing.

Let me know if you're still running into issues, I'll do my best to assist.

Cheers,
Patryk

from cloudinary_npm.

filipposwift avatar filipposwift commented on June 10, 2024 3

Hi cloudinary-pkoniu
I have the same problem with the following configuration:

Node: v18.14.2
Pnpm: v8.6.2

package.json:
"dependencies": {
"@types/node": "20.3.1",
"@types/react": "18.2.13",
"@types/react-dom": "18.2.6",
"autoprefixer": "10.4.14",
"cloudinary": "^1.37.2",
"eslint": "8.43.0",
"eslint-config-next": "13.4.6",
"next": "13.4.6",
"postcss": "8.4.24",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hot-toast": "^2.4.1",
"tailwindcss": "3.3.2",
"typescript": "5.1.3"
}

This is the function calling cloudinary:

import { v2 as cloudinary } from 'cloudinary'

async function getDesignerFolders() {
cloudinary.config({
cloud_name: 'mycloudname',
api_key: process.env.CLOUDINARY_API_KEY
})
const cloudinaryData = await cloudinary.api.sub_folders('/somefolders')
const folders = cloudinaryData.folders.map((folder: any) => folder.name)

return folders
}

and this is the full error trace:

  • warn ./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/compiler.js
    Module not found: Can't resolve 'coffee-script' in '/Users/Filippo/Desktop/next/myproject/node_modules/.pnpm/[email protected]/node_modules/vm2/lib'

Import trace for requested module:
./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/compiler.js
./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/script.js
./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/main.js
./node_modules/.pnpm/[email protected]/node_modules/vm2/index.js
./node_modules/.pnpm/[email protected]/node_modules/degenerator/dist/src/index.js
./node_modules/.pnpm/[email protected]/node_modules/pac-resolver/dist/index.js
./node_modules/.pnpm/[email protected]/node_modules/pac-proxy-agent/dist/agent.js
./node_modules/.pnpm/[email protected]/node_modules/pac-proxy-agent/dist/index.js
./node_modules/.pnpm/[email protected]/node_modules/proxy-agent/index.js
./node_modules/.pnpm/[email protected]/node_modules/cloudinary/lib-es5/utils/index.js
./node_modules/.pnpm/[email protected]/node_modules/cloudinary/lib-es5/cloudinary.js
./node_modules/.pnpm/[email protected]/node_modules/cloudinary/cloudinary.js
./app/shopify/page.tsx

./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/resolver-compat.js
Critical dependency: the request of a dependency is an expression

Import trace for requested module:
./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/resolver-compat.js
./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/main.js
./node_modules/.pnpm/[email protected]/node_modules/vm2/index.js
./node_modules/.pnpm/[email protected]/node_modules/degenerator/dist/src/index.js
./node_modules/.pnpm/[email protected]/node_modules/pac-resolver/dist/index.js
./node_modules/.pnpm/[email protected]/node_modules/pac-proxy-agent/dist/agent.js
./node_modules/.pnpm/[email protected]/node_modules/pac-proxy-agent/dist/index.js
./node_modules/.pnpm/[email protected]/node_modules/proxy-agent/index.js
./node_modules/.pnpm/[email protected]/node_modules/cloudinary/lib-es5/utils/index.js
./node_modules/.pnpm/[email protected]/node_modules/cloudinary/lib-es5/cloudinary.js
./node_modules/.pnpm/[email protected]/node_modules/cloudinary/cloudinary.js
./app/shopify/page.tsx
(node:49600) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use node --trace-deprecation ... to show where the warning was created)

  • error Error: ENOENT: no such file or directory, open '/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/bridge.js'
    at Object.openSync (node:fs:600:3)
    at Object.readFileSync (node:fs:468:35)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/vm.js:109:120)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/vm.js (/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/page.js:13686:1)
    at webpack_require (/Users/Filippo/Desktop/next/myproject/.next/server/webpack-runtime.js:33:43)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/main.js:4:16)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/main.js (/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/page.js:13621:1)
    at webpack_require (/Users/Filippo/Desktop/next/myproject/.next/server/webpack-runtime.js:33:43)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/index.js:3:18)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/index.js (/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/page.js:13567:1) {
    digest: undefined
    }
  • warn ./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/compiler.js
    Module not found: Can't resolve 'coffee-script' in '/Users/Filippo/Desktop/next/myproject/node_modules/.pnpm/[email protected]/node_modules/vm2/lib'

Import trace for requested module:
./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/compiler.js
./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/script.js
./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/main.js
./node_modules/.pnpm/[email protected]/node_modules/vm2/index.js
./node_modules/.pnpm/[email protected]/node_modules/degenerator/dist/src/index.js
./node_modules/.pnpm/[email protected]/node_modules/pac-resolver/dist/index.js
./node_modules/.pnpm/[email protected]/node_modules/pac-proxy-agent/dist/agent.js
./node_modules/.pnpm/[email protected]/node_modules/pac-proxy-agent/dist/index.js
./node_modules/.pnpm/[email protected]/node_modules/proxy-agent/index.js
./node_modules/.pnpm/[email protected]/node_modules/cloudinary/lib-es5/utils/index.js
./node_modules/.pnpm/[email protected]/node_modules/cloudinary/lib-es5/cloudinary.js
./node_modules/.pnpm/[email protected]/node_modules/cloudinary/cloudinary.js
./app/shopify/page.tsx

./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/resolver-compat.js
Critical dependency: the request of a dependency is an expression

Import trace for requested module:
./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/resolver-compat.js
./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/main.js
./node_modules/.pnpm/[email protected]/node_modules/vm2/index.js
./node_modules/.pnpm/[email protected]/node_modules/degenerator/dist/src/index.js
./node_modules/.pnpm/[email protected]/node_modules/pac-resolver/dist/index.js
./node_modules/.pnpm/[email protected]/node_modules/pac-proxy-agent/dist/agent.js
./node_modules/.pnpm/[email protected]/node_modules/pac-proxy-agent/dist/index.js
./node_modules/.pnpm/[email protected]/node_modules/proxy-agent/index.js
./node_modules/.pnpm/[email protected]/node_modules/cloudinary/lib-es5/utils/index.js
./node_modules/.pnpm/[email protected]/node_modules/cloudinary/lib-es5/cloudinary.js
./node_modules/.pnpm/[email protected]/node_modules/cloudinary/cloudinary.js
./app/shopify/page.tsx

  • wait compiling /_error (client and server)...
  • warn ./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/compiler.js
    Module not found: Can't resolve 'coffee-script' in '/Users/Filippo/Desktop/next/myproject/node_modules/.pnpm/[email protected]/node_modules/vm2/lib'

Import trace for requested module:
./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/compiler.js
./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/script.js
./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/main.js
./node_modules/.pnpm/[email protected]/node_modules/vm2/index.js
./node_modules/.pnpm/[email protected]/node_modules/degenerator/dist/src/index.js
./node_modules/.pnpm/[email protected]/node_modules/pac-resolver/dist/index.js
./node_modules/.pnpm/[email protected]/node_modules/pac-proxy-agent/dist/agent.js
./node_modules/.pnpm/[email protected]/node_modules/pac-proxy-agent/dist/index.js
./node_modules/.pnpm/[email protected]/node_modules/proxy-agent/index.js
./node_modules/.pnpm/[email protected]/node_modules/cloudinary/lib-es5/utils/index.js
./node_modules/.pnpm/[email protected]/node_modules/cloudinary/lib-es5/cloudinary.js
./node_modules/.pnpm/[email protected]/node_modules/cloudinary/cloudinary.js
./app/shopify/page.tsx

./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/resolver-compat.js
Critical dependency: the request of a dependency is an expression

Import trace for requested module:
./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/resolver-compat.js
./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/main.js
./node_modules/.pnpm/[email protected]/node_modules/vm2/index.js
./node_modules/.pnpm/[email protected]/node_modules/degenerator/dist/src/index.js
./node_modules/.pnpm/[email protected]/node_modules/pac-resolver/dist/index.js
./node_modules/.pnpm/[email protected]/node_modules/pac-proxy-agent/dist/agent.js
./node_modules/.pnpm/[email protected]/node_modules/pac-proxy-agent/dist/index.js
./node_modules/.pnpm/[email protected]/node_modules/proxy-agent/index.js
./node_modules/.pnpm/[email protected]/node_modules/cloudinary/lib-es5/utils/index.js
./node_modules/.pnpm/[email protected]/node_modules/cloudinary/lib-es5/cloudinary.js
./node_modules/.pnpm/[email protected]/node_modules/cloudinary/cloudinary.js
./app/shopify/page.tsx

  • error Error: ENOENT: no such file or directory, open '/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/bridge.js'
    at Object.openSync (node:fs:600:3)
    at Object.readFileSync (node:fs:468:35)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/vm.js:109:120)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/vm.js (/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/page.js:13686:1)
    at webpack_require (/Users/Filippo/Desktop/next/myproject/.next/server/webpack-runtime.js:33:43)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/main.js:4:16)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/main.js (/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/page.js:13621:1)
    at webpack_require (/Users/Filippo/Desktop/next/myproject.next/server/webpack-runtime.js:33:43)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/index.js:3:18)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/index.js (/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/page.js:13567:1) {
    digest: undefined
    }
    (node:49631) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
    (Use node --trace-deprecation ... to show where the warning was created)
    (node:49632) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
    (Use node --trace-deprecation ... to show where the warning was created)
  • error Error: ENOENT: no such file or directory, open '/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/bridge.js'
    at Object.openSync (node:fs:600:3)
    at Object.readFileSync (node:fs:468:35)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/vm.js:109:120)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/vm.js (/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/page.js:13686:1)
    at webpack_require (/Users/Filippo/Desktop/next/myproject/.next/server/webpack-runtime.js:33:43)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/main.js:4:16)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/main.js (/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/page.js:13621:1)
    at webpack_require (/Users/Filippo/Desktop/next/myproject/.next/server/webpack-runtime.js:33:43)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/index.js:3:18)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/index.js (/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/page.js:13567:1) {
    digest: undefined
    }
    (node:49635) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
    (Use node --trace-deprecation ... to show where the warning was created)
  • error Error: ENOENT: no such file or directory, open '/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/bridge.js'
    at Object.openSync (node:fs:600:3)
    at Object.readFileSync (node:fs:468:35)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/vm.js:109:120)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/vm.js (/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/page.js:13686:1)
    at webpack_require (/Users/Filippo/Desktop/next/myproject/.next/server/webpack-runtime.js:33:43)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/main.js:4:16)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/main.js (/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/page.js:13621:1)
    at webpack_require (/Users/Filippo/Desktop/next/myproject/.next/server/webpack-runtime.js:33:43)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/index.js:3:18)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/index.js (/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/page.js:13567:1) {
    digest: undefined
    }
    (node:49637) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
    (Use node --trace-deprecation ... to show where the warning was created)
  • error Error: ENOENT: no such file or directory, open '/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/bridge.js'
    at Object.openSync (node:fs:600:3)
    at Object.readFileSync (node:fs:468:35)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/vm.js:109:120)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/vm.js (/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/page.js:13686:1)
    at webpack_require (/Users/Filippo/Desktop/next/myproject/.next/server/webpack-runtime.js:33:43)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/main.js:4:16)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/main.js (/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/page.js:13621:1)
    at webpack_require (/Users/Filippo/Desktop/next/myproject/.next/server/webpack-runtime.js:33:43)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/index.js:3:18)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/index.js (/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/page.js:13567:1) {
    digest: undefined
    }
    (node:49641) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
    (Use node --trace-deprecation ... to show where the warning was created)
  • error Error: ENOENT: no such file or directory, open '/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/bridge.js'
    at Object.openSync (node:fs:600:3)
    at Object.readFileSync (node:fs:468:35)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/vm.js:109:120)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/vm.js (/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/page.js:13686:1)
    at webpack_require (/Users/Filippo/Desktop/nextmyproject/.next/server/webpack-runtime.js:33:43)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/main.js:4:16)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/main.js (/Users/Filippo/Desktop/next/myproject.next/server/app/shopify/page.js:13621:1)
    at webpack_require (/Users/Filippo/Desktop/next/myproject/.next/server/webpack-runtime.js:33:43)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/index.js:3:18)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/index.js (/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/page.js:13567:1) {
    digest: undefined
    }
    (node:49642) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
    (Use node --trace-deprecation ... to show where the warning was created)
  • error Error: ENOENT: no such file or directory, open '/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/bridge.js'
    at Object.openSync (node:fs:600:3)
    at Object.readFileSync (node:fs:468:35)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/vm.js:109:120)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/vm.js (/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/page.js:13686:1)
    at webpack_require (/Users/Filippo/Desktop/next/myproject/.next/server/webpack-runtime.js:33:43)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/main.js:4:16)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/main.js (/Users/Filippo/Desktop/next/myproject.next/server/app/shopify/page.js:13621:1)
    at webpack_require (/Users/Filippo/Desktop/next/myproject/.next/server/webpack-runtime.js:33:43)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/index.js:3:18)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/index.js (/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/page.js:13567:1) {
    digest: undefined
    }
    (node:49645) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
    (Use node --trace-deprecation ... to show where the warning was created)
  • error Error: ENOENT: no such file or directory, open '/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/bridge.js'
    at Object.openSync (node:fs:600:3)
    at Object.readFileSync (node:fs:468:35)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/vm.js:109:120)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/vm.js (/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/page.js:13686:1)
    at webpack_require (/Users/Filippo/Desktop/next/myproject/.next/server/webpack-runtime.js:33:43)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/main.js:4:16)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/main.js (/Users/Filippo/Desktop/nextmyproject/.next/server/app/shopify/page.js:13621:1)
    at webpack_require (/Users/Filippo/Desktop/next/myproject/.next/server/webpack-runtime.js:33:43)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/index.js:3:18)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/index.js (/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/page.js:13567:1) {
    digest: undefined
    }
    (node:49646) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
    (Use node --trace-deprecation ... to show where the warning was created)
  • error Error: ENOENT: no such file or directory, open '/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/bridge.js'
    at Object.openSync (node:fs:600:3)
    at Object.readFileSync (node:fs:468:35)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/vm.js:109:120)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/vm.js (/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/page.js:13686:1)
    at webpack_require (/Users/Filippo/Desktop/next/myproject/.next/server/webpack-runtime.js:33:43)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/main.js:4:16)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/main.js (/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/page.js:13621:1)
    at webpack_require (/Users/Filippo/Desktop/next/myproject/.next/server/webpack-runtime.js:33:43)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/index.js:3:18)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/index.js (/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/page.js:13567:1) {
    digest: undefined
    }
    (node:49647) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
    (Use node --trace-deprecation ... to show where the warning was created)
  • error Error: ENOENT: no such file or directory, open '/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/bridge.js'
    at Object.openSync (node:fs:600:3)
    at Object.readFileSync (node:fs:468:35)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/vm.js:109:120)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/vm.js (/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/page.js:13686:1)
    at webpack_require (/Users/Filippo/Desktop/next/myproject/.next/server/webpack-runtime.js:33:43)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/main.js:4:16)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/main.js (/Users/Filippo/Desktop/next/myproject.next/server/app/shopify/page.js:13621:1)
    at webpack_require (/Users/Filippo/Desktop/next/myproject/.next/server/webpack-runtime.js:33:43)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/index.js:3:18)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/index.js (/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/page.js:13567:1) {
    digest: undefined
    }
    (node:49650) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
    (Use node --trace-deprecation ... to show where the warning was created)
  • error Error: ENOENT: no such file or directory, open '/Users/Filippo/Desktop/next/myprojectr/.next/server/app/shopify/bridge.js'
    at Object.openSync (node:fs:600:3)
    at Object.readFileSync (node:fs:468:35)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/vm.js:109:120)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/vm.js (/Users/Filippo/Desktop/nextmyproject/.next/server/app/shopify/page.js:13686:1)
    at webpack_require (/Users/Filippo/Desktop/next/myproject/.next/server/webpack-runtime.js:33:43)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/main.js:4:16)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/main.js (/Users/Filippo/Desktop/nextmyproject/.next/server/app/shopify/page.js:13621:1)
    at webpack_require (/Users/Filippo/Desktop/next/myproject/.next/server/webpack-runtime.js:33:43)
    at eval (webpack-internal:///(sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/index.js:3:18)
    at (sc_server)/./node_modules/.pnpm/[email protected]/node_modules/vm2/index.js (/Users/Filippo/Desktop/next/myproject/.next/server/app/shopify/page.js:13567:1) {
    digest: undefined
    }

Hope this help
Filippo

from cloudinary_npm.

marketsystems avatar marketsystems commented on June 10, 2024 3

Hi folks, just to add some more feedback about the dependecy warning, it happens only when cloudinary package is being used inside /app directory. The workaround I had to use was moving all cloudinary logic to /pages/api directory, and worked just fine in there. My versions: "cloudinary": "^1.37.1", "next": "13.4.2", Hope this helps and thanks for working on this

Not a solution considering app dir is now stable and people probably want to use cloudinary with app dir without all the warnings :D

from cloudinary_npm.

cloudinary-pkoniu avatar cloudinary-pkoniu commented on June 10, 2024 2

Hi @roberto-duran @filipposwift,

just wanted to let you know, that I managed to replicate the same behaviour with a new next.js project and I'm on it. I'll release the sdk that includes a fix as soon as possible.

Best,
Patryk

from cloudinary_npm.

marketsystems avatar marketsystems commented on June 10, 2024 1

well over a month more like a leisurely jog :D :D

from cloudinary_npm.

cloudinary-pkoniu avatar cloudinary-pkoniu commented on June 10, 2024 1

Hi @ibqn,

just wanted to answer your question regarding the coffee-script package. It's a dependency of a package vm2, which is a transitive dependency of proxy-agent that is listed in sdk's package.json as an optional dependency of the sdk.

By default, npm (not sure about the behaviour of yarn or pnpm though) installs all of the optional dependencies when using install command, unless an option --omit=optional is used. In my local env, when using next.js@13, installing project's dependencies with that option fixes the problem.

I understand it's only a quick workaround and not an actual fix, I'm trying to come up with an elegant solution that would fix all of the problems we've got listed here.

from cloudinary_npm.

ondrejhudek avatar ondrejhudek commented on June 10, 2024

+1

from cloudinary_npm.

marketsystems avatar marketsystems commented on June 10, 2024

seems like nobody wants to fix it

from cloudinary_npm.

tamaracloudinary avatar tamaracloudinary commented on June 10, 2024

Hi @ondrejhudek, @marketsystems
Sorry for the late reply, we opened an internal ticket regarding your request.
We will keep you updated here and let you know once it's deployed.
Thanks!
Tamara

from cloudinary_npm.

mmachatschek avatar mmachatschek commented on June 10, 2024

@tamaracloudinary this issue originates from the utils/index.js optionalRequire() function. webpack doesn't like requiring dynamic dependencies.
As this function is only used for the proxy-agent stuff, it probably would make sense to write a workaround for only this optional dependency.

from cloudinary_npm.

tamaracloudinary avatar tamaracloudinary commented on June 10, 2024

@mmachatschek thank you, I've forwarded it to the team.
We will keep you updated here and let you know once it's deployed.
Thanks!
Tamara

from cloudinary_npm.

jackvane avatar jackvane commented on June 10, 2024

+ 1, please fix this.

from cloudinary_npm.

tamaracloudinary avatar tamaracloudinary commented on June 10, 2024

Hi, I'm happy to share that the fix will be deployed at the next sprint, we will update here once it's deployed.
Thanks for letting us know!
Kind regards,
Tamara

from cloudinary_npm.

cloudinary-pkoniu avatar cloudinary-pkoniu commented on June 10, 2024

Hi everyone!
Sorry for the delay in fixing the issue. Please try using the sdk in the latest version and let us know if it fixed the issue for you, so we can close it.

Cheers!

from cloudinary_npm.

spencersmb avatar spencersmb commented on June 10, 2024

Had to revert back to 1.36.1 because it was completely breaking my next.js app. i'm using Next.js v 13.4.4 and was getting all the warnings as previously mentioned still, but it was unable to locate a file in "/app/blog/bridge.js", even though the only file in my folder structure is app/blog/page.tsx.

Hope this helps figure out the issue.

from cloudinary_npm.

tamaracloudinary avatar tamaracloudinary commented on June 10, 2024

Hi @spencersmb, Thank you for providing us with your valuable feedback. I assure you that I will ensure our development team receives this feedback.

  • Tamara

from cloudinary_npm.

roberto-duran avatar roberto-duran commented on June 10, 2024

thanks, it was driving me crazy...
i have same sceneraio next 13.4.4/app dir and with vr: 1.37.1 its not working

from cloudinary_npm.

cloudinary-pkoniu avatar cloudinary-pkoniu commented on June 10, 2024

Hi @spencersmb and @roberto-duran,

Thanks for reaching out.

In order to reproduce the issue, I need some more information.
Can I please ask you to provide more details about the problem you're encountering?

I know that you're using [email protected] and [email protected] but can you please confirm your current node.js version?

Also what would really help me, would be some kind of a runnable snippet that breaks for you. I've set up a basic webpack (version 5.86.0) project with [email protected] as a dependency and I'm not getting any similar errors to you. Also, the warnings mentioned by the OP are gone as well.

Looking forward to your response.

Best,
Patryk

from cloudinary_npm.

roberto-duran avatar roberto-duran commented on June 10, 2024

Hi @spencersmb and @roberto-duran,

Thanks for reaching out.

In order to reproduce the issue, I need some more information. Can I please ask you to provide more details about the problem you're encountering?

I know that you're using [email protected] and [email protected] but can you please confirm your current node.js version?

Also what would really help me, would be some kind of a runnable snippet that breaks for you. I've set up a basic webpack (version 5.86.0) project with [email protected] as a dependency and I'm not getting any similar errors to you. Also, the warnings mentioned by the OP are gone as well.

Looking forward to your response.

Best, Patryk
Hi,

node V20.1.0

this is waht i try to run
await cloudinary.v2.uploader.upload(image_url, {
i also test it with the new cloudinary V1.37.2
and i have the same error that report @filipposwift
oh btw im trying to run this in next.js routes api.

from cloudinary_npm.

ibqn avatar ibqn commented on June 10, 2024

I am also affected by this, it seems that there is no possibility to use next 13 api routes together with with cloudinary node api.

- warn ./node_modules/.pnpm/[email protected]/node_modules/coffee-script/lib/coffee-script/coffee-script.js
require.extensions is not supported by webpack. Use a loader instead.

Import trace for requested module:
./node_modules/.pnpm/[email protected]/node_modules/coffee-script/lib/coffee-script/coffee-script.js
./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/compiler.js
./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/script.js
./node_modules/.pnpm/[email protected]/node_modules/vm2/lib/main.js
./node_modules/.pnpm/[email protected]/node_modules/vm2/index.js
./node_modules/.pnpm/[email protected]/node_modules/degenerator/dist/src/index.js
./node_modules/.pnpm/[email protected]/node_modules/pac-resolver/dist/index.js
./node_modules/.pnpm/[email protected]/node_modules/pac-proxy-agent/dist/agent.js
./node_modules/.pnpm/[email protected]/node_modules/pac-proxy-agent/dist/index.js
./node_modules/.pnpm/[email protected]/node_modules/proxy-agent/index.js
./node_modules/.pnpm/[email protected]/node_modules/cloudinary/lib-es5/utils/index.js
./node_modules/.pnpm/[email protected]/node_modules/cloudinary/lib-es5/cloudinary.js
./node_modules/.pnpm/[email protected]/node_modules/cloudinary/cloudinary.js
./src/app/api/sign-cloudinary-params/route.ts

./node_modules/.pnpm/[email protected]/node_modules/coffee-script/lib/coffee-script/coffee-script.js
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

is cloudinary also relying on the deprecated coffee-script package?

from cloudinary_npm.

gmzi avatar gmzi commented on June 10, 2024

Hi folks, just to add some more feedback about the dependecy warning, it happens only when cloudinary package is being used inside /app directory. The workaround I had to use was moving all cloudinary logic to /pages/api directory, and worked just fine in there. My versions:
"cloudinary": "^1.37.1",
"next": "13.4.2",
Hope this helps and thanks for working on this

from cloudinary_npm.

valenguerra avatar valenguerra commented on June 10, 2024

Please add support for Next.js 13.

from cloudinary_npm.

ajesuscode avatar ajesuscode commented on June 10, 2024

Same on my side

from cloudinary_npm.

thatAwesomeKK avatar thatAwesomeKK commented on June 10, 2024

Still having the Problem

from cloudinary_npm.

roberto-duran avatar roberto-duran commented on June 10, 2024

@cloudinary-pkoniu i just verify and it works!. in the next js server side, so no more work around needed.
TY!

from cloudinary_npm.

ibqn avatar ibqn commented on June 10, 2024

@cloudinary-pkoniu thank you, works like a charm with app router.

from cloudinary_npm.

thatAwesomeKK avatar thatAwesomeKK commented on June 10, 2024

Working Now, Just Tested!
Thank You 🙂

from cloudinary_npm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.