Error TypeError Object values is not a function

0 votes

Object.values() received following error:

TypeError: Object.values is not a function.

I have seen that Object.values() is not supported in all browsers.

But I am using the function in Node.js on server side - How can I use Object.values() in Node.js it seems so intuitive like Object.keys()?

Oct 15, 2020 in Node-js by kartik
• 37,520 points
2,284 views

1 answer to this question.

0 votes

Hello @kartik,

Object.values is a new feature . It is very bleeding edge. Node.js has full support for it from version 7.0.

You can either:

  • Upgrade to the latest Node.js LTS and use --harmony
  • Upgrade to the latest Node.js Current
  • Use a polyfill
answered Oct 15, 2020 by Niroj
• 82,840 points

Related Questions In Node-js

0 votes
0 answers
0 votes
1 answer

Error:nvm is not compatible with the npm config "prefix" option:

Hello @kartik, After installing nvm using brew, create ~/.nvm directory: $ ...READ MORE

answered Jul 15, 2020 in Node-js by Niroj
• 82,840 points
4,809 views
0 votes
1 answer

Error:“NODE_ENV” is not recognized as an internal or external command, operable command or batch file

Hello @kartik, It sounds like your error comes ...READ MORE

answered Jul 16, 2020 in Node-js by Niroj
• 82,840 points
20,259 views
0 votes
1 answer

Error:'bower' is not recognized as an internal or external command, operable program or batch file

Hello @kartik, Fixed it by adding the 'npm' ...READ MORE

answered Oct 14, 2020 in Node-js by Niroj
• 82,840 points
5,710 views
0 votes
1 answer

How to write files in Node.js?

Hello @kartik, Currently there are three ways to ...READ MORE

answered Jul 8, 2020 in Node-js by Niroj
• 82,840 points
908 views
0 votes
1 answer

How to Install a local module using npm?

Hello @kartik, This is what worked for me: npm ...READ MORE

answered Jul 9, 2020 in Node-js by Niroj
• 82,840 points
9,794 views
0 votes
1 answer

How to run Gulp tasks sequentially one after the other?

Hello @kartik, By default, gulp runs tasks simultaneously, ...READ MORE

answered Jul 12, 2020 in Node-js by Niroj
• 82,840 points
1,486 views
0 votes
1 answer

How to set environment variables from within package.json?

Hello @kartik, Set the environment variable in the ...READ MORE

answered Jul 13, 2020 in Node-js by Niroj
• 82,840 points
23,952 views
0 votes
2 answers

Error:'TypeError: is not a function' in Node.js

You are exporting module.exports.redir = redir; That means that ...READ MORE

answered Oct 21, 2020 in Node-js by anonymous
• 140 points
17,282 views
0 votes
1 answer

Error:Failed to parse json-This is not a bug in npm.

Hello @kartik, Try this: npm cache clean Hope it works!! Thank ...READ MORE

answered Nov 27, 2020 in Node-js by Niroj
• 82,840 points
4,741 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP