yeoman / yo

CLI tool for running Yeoman generators

Home Page:http://yeoman.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot Install Yeoman: TypeError: Object.fromEntries is not a function

amirmsai opened this issue · comments

Hi All,
when i try to install SPFx (all Versions 1.11 => 1.14) and if i try to install Yeoman i receive this Error, any Idea ??

{ Error: Command failed: yo --version
C:\Users\Msai\AppData\Roaming\npm\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. (C:\Users\Msai\AppData\Roaming\npm\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. (C:\Users\Msai\AppData\Roaming\npm\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)

at makeError (C:\Users\Msai\AppData\Roaming\npm\node_modules\yo\node_modules\execa\index.js:174:9)
at Promise.all.then.arr (C:\Users\Msai\AppData\Roaming\npm\node_modules\yo\node_modules\execa\index.js:278:16)
at process._tickCallback (internal/process/next_tick.js:68:7)
code: 1,
stdout: '',
stderr:
'C:\Users\Msai\AppData\Roaming\npm\node_modules\yo\node_modules\npm-registry-fetch\node_modules@npmcli\fs\lib\fs.js:6\r\nconst fsSync = Object.fromEntries(Object.entries(fs).filter(([k, v]) =>\r\n ^\r\n\r\nTypeError: Object.fromEntries is not a function\r\n at Object. (C:\Users\Msai\AppData\Roaming\npm\node_modules\yo\node_modules\npm-registry-fetch\node_modules@npmcli\fs\lib\fs.js:6:23)\r\n at Module._compile (internal/modules/cjs/loader.js:778:30)\r\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)\r\n at Module.load (internal/modules/cjs/loader.js:653:32)\r\n at tryModuleLoad (internal/modules/cjs/loader.js:593:12)\r\n at Function.Module._load (internal/modules/cjs/loader.js:585:3)\r\n at Module.require (internal/modules/cjs/loader.js:692:17)\r\n at require (internal/modules/cjs/helpers.js:25:18)\r\n at Object. (C:\Users\Msai\AppData\Roaming\npm\node_modules\yo\node_modules\npm-registry-fetch\node_modules@npmcli\fs\lib\index.js:2:6)\r\n at Module._compile (internal/modules/cjs/loader.js:778:30)\r\n',
failed: true,
signal: null,
cmd: 'yo --version',
timedOut: false,
killed: false }
× yo version

This issue sorted out ?

Yo requires node 12.
Update node to v12

But the project in repo Node version is 10.24.1. npm is v6.14.12. Windows 11 OS

Needs to be updated.

"node": ">=12.10.0"

The yeoman-environment and yeoman-generator has this requirement and breaks at v10.
Some generators may also require a more updated node.

cannot install the new version because my team members are using v10.

How to update [yo/package.json]

cannot install the new version because my team members are using v10.

How to update [yo/package.json] . Where is the location ?

cannot install the new version because my team members are using v10.
How to update [yo/package.json] . Where is the location ?

I get error for npm install -g yo
yo-error

For node v10 you need to use yo@3.
npm install yo@3.

node v10 and v12 are EOL so please update to v14.