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

TypeError: Cannot read property 'trim' of undefined #67

Closed
ManalLiaquat opened this issue Oct 8, 2020 · 2 comments
Closed

TypeError: Cannot read property 'trim' of undefined #67

ManalLiaquat opened this issue Oct 8, 2020 · 2 comments

Comments

@ManalLiaquat
Copy link

ManalLiaquat commented Oct 8, 2020

Getting this error when running the server (nodemon server.js)

C:\<USER>\~\server\node_modules\postmark\dist\client\BaseClient.js:22
        this.token = token.trim();
                           ^

TypeError: Cannot read property 'trim' of undefined
    at ServerClient.BaseClient (D:\Manal Files\Office-Work\closebuy\server\node_modules\postmark\dist\client\BaseClient.js:22:28)

version: ^2.6.0

@ibalosh
Copy link
Contributor

ibalosh commented Oct 14, 2020

Hi @ManalLiaquat

it seems that server token is not set when you initialize your client. Are you passing token as stream value? Could you share details how you initialize your postmark server or account client?

Igor

@taraldjoh
Copy link

Hi @ManalLiaquat

I had the similar issue when I installed my project on an Ubuntu laptop.

I resolved this by adding the Server API token to my configuration files so that it was initiated when starting up the project. This eliminates the error, so it's probably because you have yet to add your api token to your project configuration.

Please let me know if this was helpful!

Kind Regards
Tarald Johansen

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

No branches or pull requests

3 participants