Comments (27)
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.
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.
(Usenode --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.
(Usenode --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.
(Usenode --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.
(Usenode --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.
(Usenode --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.
(Usenode --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.
(Usenode --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.
(Usenode --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.
(Usenode --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.
(Usenode --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.
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.
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.
well over a month more like a leisurely jog :D :D
from cloudinary_npm.
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.
+1
from cloudinary_npm.
seems like nobody wants to fix it
from cloudinary_npm.
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.
@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.
@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.
+ 1, please fix this.
from cloudinary_npm.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Please add support for Next.js 13.
from cloudinary_npm.
Same on my side
from cloudinary_npm.
Still having the Problem
from cloudinary_npm.
@cloudinary-pkoniu i just verify and it works!. in the next js server side, so no more work around needed.
TY!
from cloudinary_npm.
@cloudinary-pkoniu thank you, works like a charm with app router.
from cloudinary_npm.
Working Now, Just Tested!
Thank You 🙂
from cloudinary_npm.
Related Issues (20)
- Remove the Node.js 6 support HOT 1
- Custom Analytics IDs Don't Produce Custom Code HOT 1
- Wrong response type from https://api.cloudinary.com/v1_1/<cloud>/auto/upload HOT 4
- Cloudinary API corrupts UTF-8 public IDs/file names HOT 2
- When will Cloudinary support node 18 or a later version? HOT 6
- Invalid signature HOT 2
- Error while uploading profile image Cannot read properties of undefined (reading 'path') HOT 1
- Property 'next_cursor' does not exist on type 'ResourceApiResponse' HOT 2
- Missing`upload_stream` documentation HOT 6
- Escaping overlay text seems impossible in the version 1.41.0 HOT 6
- Unexpected token < in JSON at position 0. Status code 500 in Nextjs 13 production build (App router) HOT 9
- Support passing in analytics product version to URL generation HOT 2
- Typescript error on search API HOT 2
- Invalid signature String to sign HOT 2
- Cloudinary.com Signup Process HOT 3
- Missing return types on v2.api.resources() HOT 4
- Uploading file as buffer does not works in production. HOT 17
- "Error: must supply api_key" in heroku log HOT 3
- mp3 file is not being deleted HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloudinary_npm.