Comments (6)
Hi @krivochenko, It's related with this issue and will be fixed soon, thanks for reporting
from mailer.
Looks like it wasn't fixed:
const mailerTransport = nodemailer.createTransport({
sendmail: true,
newline: 'unix',
path: '/usr/sbin/sendmail',
});
@Module({
imports: [
MailerModule.forRoot({
transport: mailerTransport,
defaults: {
from: config.get('mailer.from'),
},
templateDir: './templates/mailer',
}),
...
$ node index.js
[Nest] 1828 - 2018-9-6 16:20:59 [Application] Converting circular structure to JSON
TypeError: Converting circular structure to JSON
at JSON.stringify (<anonymous>)
at ModuleTokenFactory.getDynamicMetadataToken (/srv/project/backend/node_modules/@nestjs/core/injector/module-token-factory.js:17:45)
at ModuleTokenFactory.create (/srv/project/backend/node_modules/@nestjs/core/injector/module-token-factory.js:11:27)
at ModuleCompiler.compile (/srv/project/backend/node_modules/@nestjs/core/injector/compiler.js:19:47)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:118:7)
at Function.Module.runMain (module.js:692:11)
at startup (bootstrap_node.js:194:16)
at bootstrap_node.js:666:3
1: node::Abort() [node]
2: 0x8cea99 [node]
3: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [node]
4: 0xb1444c [node]
5: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) [node]
6: 0x154bbd1842fd
Aborted
error Command failed with exit code 134.
nest version: 5.2.0
from mailer.
Looks like it wasn't fixed:
const mailerTransport = nodemailer.createTransport({ sendmail: true, newline: 'unix', path: '/usr/sbin/sendmail', }); @Module({ imports: [ MailerModule.forRoot({ transport: mailerTransport, defaults: { from: config.get('mailer.from'), }, templateDir: './templates/mailer', }), ...
$ node index.js [Nest] 1828 - 2018-9-6 16:20:59 [Application] Converting circular structure to JSON TypeError: Converting circular structure to JSON at JSON.stringify (<anonymous>) at ModuleTokenFactory.getDynamicMetadataToken (/srv/project/backend/node_modules/@nestjs/core/injector/module-token-factory.js:17:45) at ModuleTokenFactory.create (/srv/project/backend/node_modules/@nestjs/core/injector/module-token-factory.js:11:27) at ModuleCompiler.compile (/srv/project/backend/node_modules/@nestjs/core/injector/compiler.js:19:47) at <anonymous> at process._tickCallback (internal/process/next_tick.js:118:7) at Function.Module.runMain (module.js:692:11) at startup (bootstrap_node.js:194:16) at bootstrap_node.js:666:3 1: node::Abort() [node] 2: 0x8cea99 [node] 3: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [node] 4: 0xb1444c [node] 5: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) [node] 6: 0x154bbd1842fd Aborted error Command failed with exit code 134.
nest version: 5.2.0
Hello @anyx! You're making the same mistake that I!
Instead of:
const mailerTransport = nodemailer.createTransport({
sendmail: true,
newline: 'unix',
path: '/usr/sbin/sendmail',
});
@Module({
imports: [
MailerModule.forRoot({
transport: mailerTransport,
defaults: {
from: config.get('mailer.from'),
},
templateDir: './templates/mailer',
}),
...
You should do:
const mailerTransport = {
sendmail: true,
newline: 'unix',
path: '/usr/sbin/sendmail',
};
@Module({
imports: [
MailerModule.forRoot({
transport: mailerTransport,
defaults: {
from: config.get('mailer.from'),
},
templateDir: './templates/mailer',
}),
...
The reason is that because in this line: https://github.com/nest-modules/mailer/blob/4de893c48fe776398828ea994ca117c5ecb03c57/lib/mailer.provider.ts, mailerProvider already calls createTransport.
@cdiaz I think that we can improve docs with examples for different plugins, if you agree I would like to submit a new PR to that!
from mailer.
Hello @RafaelTCostella , your PR will be welcome, feel free to contribute.
Thanks
from mailer.
Done!
from mailer.
Solved in v 0.4.1
from mailer.
Related Issues (20)
- Template being undefined when i make a request to my endpoint
- Old css-inline dependency missing, but still required HOT 9
- 1.11 breaks backward compatibility HOT 7
- Error: Cannot find module '@css-inline/css-inline-linux-x64-musl' HOT 2
- Message "ERROR [MailerService] Transporter is ready" when mail connection is successful HOT 48
- Preview not working?
- Critical vulnerability in preview-email package HOT 1
- verifyTransporter function doesn't check if transport.verify is defined
- Error: Cannot find module '@css-inline/css-inline-freebsd-x64' HOT 2
- Is this project alive? HOT 3
- use multiple user and pass for auth in transport
- In search of members for the organization HOT 4
- lib/mailer.service.ts#L23 private to public? HOT 3
- [Bug]: transporter.verify(...).then is not a function was not fixed in 2.0.0 HOT 3
- Error: Cannot find module 'preview-email', in version 2.0.0 HOT 4
- Error: Cannot find module 'preview-email' HOT 10
- MailerService at index [1] is available in the module
- Error: connect ENOENT alt1.gmail-smtp-in.l.google.com HOT 1
- Vulnerability in the 2.0.2 HOT 6
- sendMail attachments error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mailer.