I am building a function that uses mongodb as dependency. When I am building the functions, it’s failing. It was working fine in my last build which was 1 month ago. I haven’t changed any code and I tried to re-deploy the same code again but I am getting this error.
WARNING in …/node_modules/mongodb/lib/operations/connect.js
1:49:11 PM: Module not found: Error: Can’t resolve ‘mongodb-client-encryption’ in ‘/opt/build/repo/node_modules/mongodb/lib/operations’
1:49:11 PM: @ …/node_modules/mongodb/lib/mongo_client.js
1:49:11 PM: @ …/node_modules/mongodb/index.js
1:49:11 PM: @ ./services/database.js
1:49:11 PM: @ ./api.js
1:49:48 PM: Treating warnings as errors because process.env.CI = true.
1:49:48 PM: Most CI servers set it automatically.
1:49:48 PM: Failed to compile.