Error: ENOENT: no such file or directory, open './AuthKey_BRCQJT6A3Q.p8' error

Error: ENOENT: no such file or directory, open ‘./AuthKey_BRCQJT6A3Q.p8’
at Object.openSync (node:fs:573:18)
at Object.readFileSync (node:fs:452:35)
at Object. (/var/task/dist/modules/babl/create-apple-token.js:6:23)
at Module. (/opt/rust/bytecode.js:1:1435)
at l._compile (/opt/rust/bytecode.js:1:3140)
at Module._extensions…js (node:internal/modules/cjs/loader:1548:10)
at Module.load (node:internal/modules/cjs/loader:1288:32)
at Module._load (node:internal/modules/cjs/loader:1104:12)
at /opt/rust/nodejs.js:1:11762
at Function.ir (/opt/rust/nodejs.js:1:12136) {
errno: -2,
code: ‘ENOENT’,
syscall: ‘open’,
path: ‘./AuthKey_BRCQJT6A3Q.p8’
}
Node.js process exited with exit status: 1. The logs above can help with debugging the issue.
Error: ENOENT: no such file or directory, open ‘./AuthKey_BRCQJT6A3Q.p8’
at Object.openSync (node:fs:573:18)
at Object.readFileSync (node:fs:452:35)
at Object. (/var/task/dist/modules/babl/create-apple-token.js:6:23)
at Module. (/opt/rust/bytecode.js:1:1435)
at l._compile (/opt/rust/bytecode.js:1:3140)
at Module._extensions…js (node:internal/modules/cjs/loader:1548:10)
at Module.load (node:internal/modules/cjs/loader:1288:32)
at Module._load (node:internal/modules/cjs/loader:1104:12)
at /opt/rust/nodejs.js:1:11762
at Function.ir (/opt/rust/nodejs.js:1:12136) {
errno: -2,
code: ‘ENOENT’,
syscall: ‘open’,
path: ‘./AuthKey_BRCQJT6A3Q.p8’
}
Node.js process exited with exit status: 1. The logs above can help with debugging the issue.

It gives this error in the logs for the AuthKey_BRCQJT6A3Q.p8 file that I have in my application, even in the dist folder. That’s why my application crashes. Can you help me how to solve this?

Hi, @tinnimizer-gmailcom! Welcome to the Vercel Community :smile:

Some things you can try:

  1. Place the file in a directory that’s part of your project structure, such as a public folder. Files in the public folder are automatically included in your deployment.
  2. If the file contains sensitive information, it’s better to use environment variables instead of including the file directly. You can set these in your Vercel project settings. This is probably your best bet.
  3. If you need to include specific files that aren’t automatically picked up by Vercel, you can use the includeFiles option in your vercel.json.

Let us know how you get on!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.