Hey all,
I recently created a website and also included a netlify function.
The function worked fine till today I had the following error:
Runtime.ImportModuleError - Error: Cannot find module '@getbrevo/brevo' Require stack: - /var/task/email.js - /var/runtime/index.mjs
The package is included in the package.json file and is at the root of my folder
{
"name": "nuxt-app",
"private": true,
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
},
"devDependencies": {
"@nuxt/devtools": "latest",
"@nuxtjs/tailwindcss": "^6.8.0",
"@types/node": "^18.17.3",
"@vueuse/core": "^10.4.1",
"@vueuse/nuxt": "^10.4.1",
"netlify-cli": "^16.2.0",
"nuxt": "^3.6.5",
"vue-i18n": "^9.2.2"
},
"dependencies": {
"@getbrevo/brevo": "^1.0.1",
"@sendgrid/mail": "^7.7.0",
"click-outside-vue3": "^4.0.1",
"dotenv": "^16.3.1",
"vue3-carousel": "^0.3.1"
}
}
In my local machine everything works fine, but the netlify function crashes because of this error.