[Bug] Object.fromEntries is not a function
koaning opened this issue Β· comments
vincent d warmerdam commented
π Bug report
Description
I wanted to give the project a spin. So I installed it, and it gave an error.
> npx hint https://webhint.io
Object.fromEntries is not a function
Details
I just installed it using npm on a M1 Mac.
npm install hint --save-dev
npm WARN saveError ENOENT: no such file or directory, open '/Users/vincentwarmerdam/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/Users/vincentwarmerdam/package.json'
npm WARN ajv-formats@2.1.1 requires a peer of ajv@^8.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN tsutils@3.21.0 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
npm WARN ws@8.5.0 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws@8.5.0 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN vincentwarmerdam No description
npm WARN vincentwarmerdam No repository field.
npm WARN vincentwarmerdam No README data
npm WARN vincentwarmerdam No license field.
+ hint@6.2.0
updated 1 package and audited 1085 packages in 6.114s
found 0 vulnerabilities
Tony Ross commented
@koaning any chance you're using a version of node
less than 12? I see from MDN that fromEntries
isn't in older versions of node and webhint may have picked up a dependency update that relies on it. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/fromEntries#browser_compatibility
Also, it's probably worth noting we're planning on requiring node 14+ soon.
vincent d warmerdam commented