-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nrm not work #105
Comments
me too |
根据提示 nrm 所依赖的 npm 版本为 latest,所以下载了 8.0.0 版本,其目录结构如下:
{
"main": "./index.js"
} 可以看出确实没有 这个问题应该是 npm 包的问题,可以暂时把 nrm 中依赖的 npm 版本降级一下,以解决
|
我通过将 要将 |
骨骼上搜了下,确实版本更新导致东西没了,版本配不上了,哎,node生态感觉要被玩坏了,这种只管向前跑,不管后边的最终,就自己在前边跑的嗨,没人跟了 |
same issue |
+1 |
|
我是在win10 上安装了node 14.4.0, npm 6.14.5,使用npm install -g nrm后,发生如上报错。经排查,确实发现nrm 的依赖的npm@latest 的package.json 种main 里面是.index.js,而package.json所在目录下面却没有index.js,和 @changyongyong 一致,同时将 package.json 的 exports 中的两个 ./index.js 和 main 中的同时改为 ./lib/npm.js 和 @sunzhangchang 一致,done 感谢以上两位! |
建议名称修改成nrm ls 执行后报错 Error: Cannot find module ’npm‘, 更容易大家搜索问题 |
npm 8.0 以上已经不支持使用 修复之后,如果 nrm 使用 8.0以上 npm,就会报错, |
Due to #106, a fresh install worked for me:
|
npm 6.14.13; cat /Users/olgman/.nvm/versions/node/v14.17.0/lib/node_modules/nrm/node_modules/npm/package.json 解决方案: |
i run code "nrm -v" on mac pro m1
result:
[
internal/modules/cjs/loader.js:456
throw e;
^
Error: Cannot find module '/usr/local/lib/node_modules/nrm/node_modules/npm/index.js'
at createEsmNotFoundErr (internal/modules/cjs/loader.js:929:15)
at finalizeEsmResolution (internal/modules/cjs/loader.js:922:15)
at resolveExports (internal/modules/cjs/loader.js:450:14)
at Function.Module._findPath (internal/modules/cjs/loader.js:490:31)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:888:27)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:93:18)
at Object. (/usr/local/lib/node_modules/nrm/cli.js:6:13)
at Module._compile (internal/modules/cjs/loader.js:1085:14) {
code: 'MODULE_NOT_FOUND',
path: '/usr/local/lib/node_modules/nrm/node_modules/npm/package.json'
}
]
The text was updated successfully, but these errors were encountered: