英文:
Error: Could not load email provider "sendgrid"
问题
以下是您要翻译的内容:
ms | [2023-06-13 15:20:43.443] debug: ⛔️ Server wasn't able to start properly.
cms | [2023-06-13 15:20:43.444] error: Could not load email provider "sendgrid".
cms | Error: Could not load email provider "sendgrid".
cms | at createProvider (/opt/app/node_modules/@strapi/plugin-email/server/bootstrap.js:21:11)
cms | at Object.module.exports [as bootstrap] (/opt/app/node_modules/@strapi/plugin-email/server/bootstrap.js:29:37)
cms | at Object.bootstrap (/opt/app/node_modules/@strapi/strapi/lib/core/domain/module/index.js:40:47)
cms | at Object.bootstrap (/opt/app/node_modules/@strapi/strapi/lib/core/registries/modules.js:28:19)
cms | at processTicksAndRejections (node:internal/process/task_queues:96:5)
cms | at async Strapi.runLifecyclesFunctions (/opt/app/node_modules/@strapi/strapi/lib/Strapi.js:531:5)
cms | at async Strapi.bootstrap (/opt/app/node_modules/@strapi/strapi/lib/Strapi.js:469:5)
cms | at async Strapi.load (/opt/app/node_modules/@strapi/strapi/lib/Strapi.js:478:5)
获取上述错误:
email: {
config: {
provider: "sendgrid",
providerOptions: {
apiKey: env("SENDGRID_API_KEY"),
},
settings: {
defaultFrom: env("SENDGRID_FROM"),
defaultReplyTo: env("SENDGRID_REPLY_TO"),
},
},
},
....
"@strapi/provider-email-sendgrid": "^4.11.1",
英文:
ms | [2023-06-13 15:20:43.443] debug: ⛔️ Server wasn't able to start properly.
cms | [2023-06-13 15:20:43.444] error: Could not load email provider "sendgrid".
cms | Error: Could not load email provider "sendgrid".
cms | at createProvider (/opt/app/node_modules/@strapi/plugin-email/server/bootstrap.js:21:11)
cms | at Object.module.exports [as bootstrap] (/opt/app/node_modules/@strapi/plugin-email/server/bootstrap.js:29:37)
cms | at Object.bootstrap (/opt/app/node_modules/@strapi/strapi/lib/core/domain/module/index.js:40:47)
cms | at Object.bootstrap (/opt/app/node_modules/@strapi/strapi/lib/core/registries/modules.js:28:19)
cms | at processTicksAndRejections (node:internal/process/task_queues:96:5)
cms | at async Strapi.runLifecyclesFunctions (/opt/app/node_modules/@strapi/strapi/lib/Strapi.js:531:5)
cms | at async Strapi.bootstrap (/opt/app/node_modules/@strapi/strapi/lib/Strapi.js:469:5)
cms | at async Strapi.load (/opt/app/node_modules/@strapi/strapi/lib/Strapi.js:478:5)
Getting the above error:
email: {
config: {
provider: "sendgrid",
providerOptions: {
apiKey: env("SENDGRID_API_KEY"),
},
settings: {
defaultFrom: env("SENDGRID_FROM"),
defaultReplyTo: env("SENDGRID_REPLY_TO"),
},
},
},
....
"@strapi/provider-email-sendgrid": "^4.11.1",
答案1
得分: 0
使用 docker-compose
时,如果没有映射卷 node_modules
,安装新模块时必须添加 --build
:
对我来说,docker-compose up --build
解决了这个问题。
英文:
When using docker-compose
if you don't have the volume node_modules
mapped you have to add --build
when you install a new module:
docker-compose up --build
fixed it for me.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论