I deployed express app to Vercel. I'm using mssql library to connect MSSQL. I tested my express app on my local and it works fine. But after deploy to vercel, I see this error.
Cannot find module '@azure/identity'
Require stack:
package.json
?
INIT_REPORT Init Duration: 223.72 ms Phase: init Status: error Error Type: Runtime.ExitError
Cannot find module '@azure/identity'
Require stack:package.json
?
INIT_REPORT Init Duration: 414.58 ms Phase: invoke Status: error Error Type: Runtime.ExitError
Error: Runtime exited with error: exit status 1Could you help me?
Also, I installed @azure/identity as well, but it didn't effect. (On local, it working without install @azure/identity separately)
I solved this problem by updating vercel.json
{
"version": 2,
"builds": [
{
"src": "index.js",
"use": "@vercel/node"
}
],
"routes": [
{
"src": "/(.*)",
"dest": "/"
}
]
}