"scripts": {
"build": "tsc",
"generate-prisma": "npx prisma generate --sql",
"deploy": "npm run generate-prisma && firebase deploy --only functions --force",
"deploy:rules": "firebase deploy --only firestore:rules",
},"functions": {
"predeploy": [
"echo \"$DATABASE_URL\" && npm --prefix \"$RESOURCE_DIR\" run generate-prisma",
"npm --prefix \"$RESOURCE_DIR\" run build",
"npm --prefix \"$RESOURCE_DIR\" install --production"
],
"source": "functions"
},
updating Node.js 20 (1st Gen) function ***... step Function failed on loading user code. This is likely due to a bug in the user code. Error message: Provided module can't be loaded.
Did you list all required modules in the package.json dependencies?
Detailed stack trace: Error: Cannot find module '.prisma/client/sql'
Require stack:
- /workspace/node_modules/@prisma/client/sql.js
- /workspace/lib/slackBots/aua-daily-update.js
- /workspace/lib/index.js
- /layers/google.nodejs.functions-framework/functions-framework/node_modules/@google-cloud/functions-framework/build/src/loader.js
- /layers/google.nodejs.functions-framework/functions-framework/node_modules/@google-cloud/functions-framework/build/src/main.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
Could not load the function, shutting down.. Please visit https://cloud.google.com/functions/docs/troubleshooting for in-depth troubleshooting documentation.