nrm
nrm copied to clipboard
[email protected] cannot work in node-14.15 (win10)
when I upgrade node from v12.x to v14.15 in windows10,after install nrm to global, the command throws error! just like below:
c:\>nrm ls
internal/validators.js:124
throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
^
[TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at validateString (internal/validators.js:124:11)
at Object.join (path.js:375:7)
at Object.<anonymous> (D:\develop\node-v14.15.4-win-x64\node_global\node_modules\nrm\cli.js:17:20)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47
] {
code: 'ERR_INVALID_ARG_TYPE'
}
after few times to try, finally, #79 give us the right way to fix it
so if you want your [email protected] work rightly, you can rewrite the code at row 17th in your node_global/node_modules/nrm/cli.js ;
const NRMRC = path.join(process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME'], '.nrmrc');
use USERPROFILE to replace HOME in win32 platform can fix local using temporarily.
At last ,Sincerely hope maintainer @Pana or @EmilyMew can merge pr #80 with to fix this bug!
After I uninstalled 14.15.4 and reinstalled 12.20.1,I also have this bug.
I also have this bug, win10, node version 14.15.4
目前,只能先这样用着先(等到后期官方发包再改:
npm i https://github.com/stefango/nrm.git#patch-1 -g
same issue
I checked the source code, and find out you need add a environment variable call HOME, then, problem can be solved, i am not good at english, hope you can get it :)
I checked the source code, and find out you need add a environment variable call HOME, then, problem can be solved, i am not good at english, hope you can get it :)
what is the value of the HOME env?
I checked the source code, and find out you need add a environment variable call HOME, then, problem can be solved, i am not good at english, hope you can get it :)
what is the value of the HOME env?
Node installation directory