generator-chrome-extension icon indicating copy to clipboard operation
generator-chrome-extension copied to clipboard

Object.fromEntries is not a function

Open ECasio opened this issue 2 years ago • 3 comments

Whenever I run 'yo chrome-extension --no-babel' to create a project without babel I receive this error. Anyone an idea what I need to do?

ECasio avatar May 15 '22 17:05 ECasio

+1, I'm seeing this as well on node v10.18.0

ronyfadel avatar Jul 06 '22 18:07 ronyfadel

+1 same here also with node v10.18.0

.nvm/versions/node/v10.18.0/lib/node_modules/yo/node_modules/npm-registry-fetch/node_modules/@npmcli/fs/lib/fs.js:6
const fsSync = Object.fromEntries(Object.entries(fs).filter(([k, v]) =>
                      ^

TypeError: Object.fromEntries is not a function
    at Object.<anonymous> (.nvm/versions/node/v10.18.0/lib/node_modules/yo/node_modules/npm-registry-fetch/node_modules/@npmcli/fs/lib/fs.js:6:23)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (.nvm/versions/node/v10.18.0/lib/node_modules/yo/node_modules/npm-registry-fetch/node_modules/@npmcli/fs/lib/index.js:2:6)
    at Module._compile (internal/modules/cjs/loader.js:778:30)

any hint?

dpalic avatar Sep 08 '22 16:09 dpalic

Object.fromEntries is supported only on version 12.0.0 of Node.js (source).

Also, in the package.json file, there's a requirement for Node.js >= 12.0.

cleydyr avatar Jul 19 '23 10:07 cleydyr