Nodemailer无法识别核心软件包

时间:2020-10-02 22:17:57

标签: node.js nodemailer

我正在尝试通过nodemailer模块发送电子邮件,并且在尝试构建用于开发的应用程序时遇到错误。我收到以下错误:

These dependencies were not found:
* child_process in ./node_modules/nodemailer/lib/sendmail-transport/index.js
* dgram in ./node_modules/native-dns-cache/lookup.js, ./node_modules/native-dns/lib/server.js
* fs in ./node_modules/native-dns/lib/platform.js, ./node_modules/nodemailer/lib/dkim/index.js and 2 others
To install them, you can run: npm install --save child_process dgram fs

我尝试使用上述命令安装它们,但是由于它们是核心依赖项,因此我刚刚获得了安全持有者。我在实际的Node.js文件夹中也有这些模块,但是nodemailer似乎无法识别它们。

如何让nodemaier识别核心安装中使用的模块?

编辑:

通过更改nodemailer软件包中的路径,我可以在核心程序中查找其他文件时遇到另一组错误

1 个答案:

答案 0 :(得分:0)

事实证明,我试图在客户端模式下使用仅服务器的软件包。

https://github.com/nuxt/nuxt.js/issues/3271