Pana / nrm

NPM registry manager, fast switch between different registries: npm, cnpm, nj, taobao
MIT License
2.79k stars 244 forks source link

cannot use #107

Open lanweipeng opened 2 years ago

lanweipeng commented 2 years ago

lanweipeng@dst71896 bin % nrm ls internal/modules/cjs/loader.js:305 throw err; ^

Error: Cannot find module '/Users/lanweipeng/.npm-global/lib/node_modules/nrm/node_modules/npm/index.js'. Please verify that the package.json has a valid "main" entry at tryPackage (internal/modules/cjs/loader.js:297:19) at Function.Module._findPath (internal/modules/cjs/loader.js:528:18) at Function.Module._resolveFilename (internal/modules/cjs/loader.js:780:27) at Function.Module._load (internal/modules/cjs/loader.js:686:27) at Module.require (internal/modules/cjs/loader.js:848:19) at require (internal/modules/cjs/helpers.js:74:18) at Object. (/Users/lanweipeng/.npm-global/lib/node_modules/nrm/cli.js:6:13) at Module._compile (internal/modules/cjs/loader.js:955:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10) at Module.load (internal/modules/cjs/loader.js:811:32) { code: 'MODULE_NOT_FOUND', path: '/Users/lanweipeng/.npm-global/lib/node_modules/nrm/node_modules/npm/package.json', requestPath: 'npm' }

CaptainOfPhB commented 2 years ago

sudo npm install -g nrm@latest can fix it.