Description
maxiaoqu@maxiaoqudeMacBook-Pro ~ % nrm ls
internal/modules/cjs/loader.js:1131
throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath);
^
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Users/maxiaoqu/.nvm/versions/node/v14.21.3/lib/node_modules/nrm/node_modules/open/index.js
require() of ES modules is not supported.
require() of /Users/maxiaoqu/.nvm/versions/node/v14.21.3/lib/node_modules/nrm/node_modules/open/index.js from /Users/maxiaoqu/.nvm/versions/node/v14.21.3/lib/node_modules/nrm/cli.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /Users/maxiaoqu/.nvm/versions/node/v14.21.3/lib/node_modules/nrm/node_modules/open/package.json.