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,510 points
1,926 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,880 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,880 points
4,209 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,880 points
19,418 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,880 points
4,866 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,880 points
698 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,880 points
8,787 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,880 points
1,230 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,880 points
23,133 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
16,541 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,880 points
4,011 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