Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"path" argument #18

Open
alexeyinn opened this issue Apr 15, 2022 · 4 comments
Open

"path" argument #18

alexeyinn opened this issue Apr 15, 2022 · 4 comments
Labels
question Further information is requested

Comments

@alexeyinn
Copy link

alexeyinn commented Apr 15, 2022

Getting error - [Nest] 4256 - ERROR [SoapModule] The "path" argument must be of type string or an instance of Buffer or URL. Received undefined

  • An error occurred while creating the soap client. Check the SOAP service URL and status.

My code:

import { Module } from "@nestjs/common";
import { SoapModule, SoapModuleOptions } from "nestjs-soap";
import { ConfigService, ConfigModule } from "@nestjs/config";

@Module({
  imports: [
    SoapModule.forRootAsync({
      clientName: "MY_SOAP_CLIENT",
      imports: [ConfigModule],
      inject: [ConfigService],
      useFactory: async (
        configService: ConfigService
      ): Promise<SoapModuleOptions> => ({
        clientName: "MY_SOAP_CLIENT",
        uri: configService.get<string>(
          "MY_API_URL_IS_HERE"
        ),
        auth: {
          username: configService.get<string>("MY_USERNAME_HERE"),
          password: configService.get<string>("MY_PASSWORD_HERE"),
        },
      }),
    }),
  ],
})
export class SoapM {}
@lehh
Copy link
Owner

lehh commented May 24, 2022

@alexeyinn,

Sorry for the delay. You maybe solved it already.

Are you sure this is getting the url: configService.get("MY_API_URL_IS_HERE") ?
This error seems related to it.

@lehh lehh added the question Further information is requested label May 24, 2022
@alexeyinn
Copy link
Author

@alexeyinn,

Sorry for the delay. You maybe solved it already.

Are you sure this is getting the url: configService.get("MY_API_URL_IS_HERE") ? This error seems related to it.

Yes

@aonoriaga
Copy link

+1

@lehh
Copy link
Owner

lehh commented Oct 29, 2022

@alexeyinn, @aonoriaga

Which exact version of nestjs and nestjs-soap are you using? Could you share your package.json or a working repository with the error?

This usually happens when the uri is undefined, probably because of a wrong or unset environment variable.

The same happens if I do this:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants