question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

terra-status-view TypeError: Object.values is not a function

See original GitHub issue

Issue Description

We’re trying to consume the terra-status-view component, which works as expected; but all our jest tests are failing. Here’s a screencap of the errors, it fails on our import lines: image

It is failing on this line: variant: _propTypes2.default.oneOf(Object.values(variants))

All research points to babel-polyfill being the culprit.

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Expected Behavior

It should not error when running jest tests.

Steps to Reproduce

  1. import terra-status-view
  2. Run jest tests

Environment

  • Component Version: 1.0.1
  • Browser Name and Version: N/A
  • Operating System and version (desktop or mobile): N/A

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
PseudoFauxcommented, Jan 23, 2018

I believe I was running 6.11.1 at the time. I was just thinking it might be a good idea to mark it in the terra-status-view’s readme that Node should be v. 8.9+

0reactions
mjhenkescommented, Jan 23, 2018

@PseudoFaux, what version were you on? We’ve documented in the .nvmrc and package.json that we use node 8.9.2

https://github.com/cerner/terra-core/blob/master/.nvmrc https://github.com/cerner/terra-core/blob/master/package.json#L7

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: Object.values is not a function ...
I need to create two arrays. The first array is an array of all the keys from the object. I created this array...
Read more >
TypeError: Object.values is not a function #3687
My tests works fine on Jest 19.0.0, but it breaks when I upgrade to Jest 20.0.4 with the following error: TypeError: Object.values is...
Read more >
Error TypeError Object values is not a function
values is not a function. I have seen that Object.values() is not supported in all browsers. But I am using the function in...
Read more >
Object.values() In JavaScript
It causes a TypeError if the argument passed is not an object. If an object is not passed as an argument to the...
Read more >
Javascript ES6 – TypeError: Object.entries is not a function
TypeError: Object.entries is not a function. It means that you are using Object.entries() function in your code (or one of your JS dependencies...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found