mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
fix: update incorrect package import
This commit is contained in:
@@ -123,25 +123,11 @@ export class ServerNats<
|
||||
|
||||
public async createNatsClient(): Promise<Client> {
|
||||
const natsPackage = await this.loadPackage(
|
||||
'nats',
|
||||
'@nats-io/transport-node',
|
||||
ServerNats.name,
|
||||
() => import('nats'),
|
||||
() => import('@nats-io/transport-node'),
|
||||
);
|
||||
|
||||
// Eagerly initialize serializer/deserializer so they can be used synchronously
|
||||
if (
|
||||
this.serializer &&
|
||||
typeof (this.serializer as any).init === 'function'
|
||||
) {
|
||||
await (this.serializer as any).init();
|
||||
}
|
||||
if (
|
||||
this.deserializer &&
|
||||
typeof (this.deserializer as any).init === 'function'
|
||||
) {
|
||||
await (this.deserializer as any).init();
|
||||
}
|
||||
|
||||
const options = this.options || ({} as NatsOptions);
|
||||
return natsPackage.connect({
|
||||
servers: NATS_DEFAULT_URL,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { headers as createHeaders } from 'nats';
|
||||
import { headers as createHeaders } from '@nats-io/transport-node';
|
||||
import { ClientNats } from '../../client/client-nats.js';
|
||||
import { ReadPacket, WritePacket } from '../../interfaces/index.js';
|
||||
import { NatsRecord } from '../../record-builders/index.js';
|
||||
|
||||
Reference in New Issue
Block a user