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: type.badge.padEnd is not a function in node 6 #46

Closed
shrirambalaji opened this issue Jun 18, 2018 · 7 comments · Fixed by #53
Closed

TypeError: type.badge.padEnd is not a function in node 6 #46

shrirambalaji opened this issue Jun 18, 2018 · 7 comments · Fixed by #53
Labels
bug Something isn't working

Comments

@shrirambalaji
Copy link

shrirambalaji commented Jun 18, 2018

Describe the bug
Calling signale methods in node 6.11.2 seem to return a TypeError

To Reproduce
Call any of the signale methods, in node 6 environment , it will fail with the following error.

  TypeError: type.badge.padEnd is not a function
  Signale._buildSignale (node_modules/signale/signale.js:198:49)
  Signale._logger (node_modules/signale/signale.js:257:20)
  fetch.then.then.catch.e (src/api/subscriptions.api.js:35:15)

Expected behavior
The logger should work as expected

Technical Info (please complete the following information)

  • OS: macOS 10.13.5
  • Signale Version: 1.2.1
  • Node.js Version: 6.11.2
@haochuan
Copy link

Same here:

Describe the bug
Calling signale methods in node 6.11.4 seem to return a TypeError

To Reproduce
Call any of the signale methods, in node 6 environment , it will fail with the following error.

TypeError: type.badge.padEnd is not a function
    at Signale._buildSignale (/Users/haochuan/Projects/log-piper/node_modules/signale/signale.js:198:49)
    at Signale._logger (/Users/haochuan/Projects/log-piper/node_modules/signale/signale.js:257:20)

Expected behavior
The logger should work as expected

Technical Info (please complete the following information)

OS: macOS 10.13.4
Signale Version: 1.2.1
Node.js Version: 6.11.4

@rjoydip-zz
Copy link
Contributor

@Shriram-Balaji and @haochuan Can you produce some code for this?

@haochuan
Copy link

@rjoydip

This is all I have to get the error:

const signale = require('signale');
signale.success('Operation successful');

@rjoydip-zz
Copy link
Contributor

@haochuan I don't understand why this is happening on your end. But it's working fine in here. 😕

@klaudiosinani klaudiosinani added the bug Something isn't working label Jun 20, 2018
@ThunbergOlle
Copy link

I have got the solution:

This is clientsided. You will have to update your version of Nodejs to the latest.

@shrirambalaji
Copy link
Author

@ThunbergOlle Could you please brief us if you know why exactlyy this is occurring. I do understand that this problem is not occuring in node 8 and above, the problem is that I can't use signale if I want to support node 6 because of the error.

@ThunbergOlle
Copy link

I don't know why exactly it's occurring. I just wanted to share how other people can fix it that can update the node version.

There are probally more modules that's similar to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants