解决:Error [ERR_REQUIRE_ESM]: require() of ES Module C:\Users\辰之星\AppData\Roaming\npm\node_modules\nrm\node_modules\open\index.js from C:\Users\辰之星\AppData\Roaming\npm\node_modules\nrm\cli.js not supported. Instead change the require of index.js in C:\Users\辰之星\AppData\Roaming\npm\node_modules\nrm\cli.js to a dynamic import() which is available in all CommonJS modules. at Object. (C:\Users\辰之星\AppData\Roaming\npm\node_modules\nrm\cli.js:9:14) { code: ‘ERR_REQUIRE_ESM’ }
1. 执行下面命令安装 nrm
npm install -g nrm open@8.4.2 --save
2.输入 nrm ls
最后,出现上面的情况,证明问题已解决。