You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vercel:
2021-11-07T19:43:37.835Z dd740350-1ac3-43c1-819b-cfcfe848babc ERROR
Error: ENOENT: no such file or directory, open 'test.proto'
at Object.openSync (fs.js:498:3)
at Object.readFileSync (fs.js:394:35)
at fetch (/var/task/node_modules/protobufjs/src/root.js:172:34)
at Root.load (/var/task/node_modules/protobufjs/src/root.js:206:13)
at Root.loadSync (/var/task/node_modules/protobufjs/src/root.js:247:17)
at Object.loadProtosWithOptionsSync (/var/task/node_modules/@grpc/proto-loader/build/src/util.js:66:29)
at Object.loadSync (/var/task/node_modules/@grpc/proto-loader/build/src/index.js:194:31)
at handler (/var/task/.next/server/pages/api/grpc.js:38:43)
at Object.apiResolver (/var/task/node_modules/next/dist/server/api-utils.js:102:15)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
{ errno: -2, syscall: 'open', code: 'ENOENT', path: 'test.proto'}
Netlify:
{
"errorType": "Runtime.UnhandledPromiseRejection",
"errorMessage": "Error: ENOENT: no such file or directory, open 'test.proto'",
"trace": [
"Runtime.UnhandledPromiseRejection: Error: ENOENT: no such file or directory, open 'test.proto'",
" at process.<anonymous> (/var/runtime/index.js:35:15)",
" at process.emit (events.js:314:20)",
" at processPromiseRejections (internal/process/promises.js:209:33)",
" at processTicksAndRejections (internal/process/task_queues.js:98:32)"
]
}
Hi!
I'm struggling with including files in my api functions. Specifically I want to include proto files, but everything is failing now...
All code works flawless when running
next dev
, but failing on Verceland on Netlify, also when runningnetlify dev
All code is here: https://github.com/richard87/protoloader
I have created a simple reproduction of the error, and deployed it at Vercel and Netlify to test:
https://protoloader.vercel.app/api/json / https://protoloader.vercel.app/api/grpc
https://protoloader-test.netlify.app/api/json / https://protoloader-test.netlify.app/api/grpc
This is my grpc.js api function:
And my vercel.json file:
With the error log:
I have looked at clues for a solution in
#194
vercel/next.js#8251
Extra:
Adding this netlify.toml solved the issue on Netlify, but the problem still persists on Vercel
The text was updated successfully, but these errors were encountered: