Commandnpm install nrm -g
to install nrm 1.2.1 error:
[TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at validateString (internal/validators.js:122:11)
at Object.join (path.js:375:7)
at Object.<anonymous> (C:\Users\liyin\AppData\Roaming\npm\node_modules\nrm\cli.js:17:20)
at Module._compile (internal/modules/cjs/loader.js:1076:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:941:32)
at Function.Module._load (internal/modules/cjs/loader.js:782: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'
}
Locate the NRM
directory (error line 4)
Open cli.js line 17
is modified to
//const NRMRC = path.join(process.env.HOME, '.nrmrc'); (DELETE)
const NRMRC = path.join(process.env[(process.platform == 'win32') ?'USERPROFILE' : 'HOME'], '.nrmrc');
After saving, reopen the command line to run the NRM LS
command normally
C:\Windows\system32>nrm ls
npm -------- [https://registry.npmjs.org/](https://registry.npmjs.org/)
yarn ------- [https://registry.yarnpkg.com/](https://registry.yarnpkg.com/)
cnpm ------- [http://r.cnpmjs.org/](http://r.cnpmjs.org/)
- taobao ----- [https://registry.npm.taobao.org/](https://registry.npm.taobao.org/)
nj --------- [https://registry.nodejitsu.com/](https://registry.nodejitsu.com/)
npmMirror -- [https://skimdb.npmjs.com/registry/](https://skimdb.npmjs.com/registry/)
edunpm ----- [http://registry.enpmjs.org/](http://registry.enpmjs.org/)
[TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at validateString (internal/validators.js:122:11)
at Object.join (path.js:375:7)
at Object.<anonymous> (C:\Users\liyin\AppData\Roaming\npm\node_modules\nrm\cli.js:17:20)
at Module._compile (internal/modules/cjs/loader.js:1076:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:941:32)
at Function.Module._load (internal/modules/cjs/loader.js:782: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'
}
Read More:
- NPM start project error: cannot find module ‘webpack’ problem solution
- How to Fix Node SASS Error in Vue + webpack project after nodejs upgrade
- Error: uncaughtexception: cannot find module ‘internal / util / types’
- Module not found: Error: Can‘t resolve ‘sass-loader‘ in…
- [Solved] swiper Error: The requested module ‘react’ is expected to be of type CommonJS, which does not support named exports. CommonJS modules can be imported by importing the default export
- [Solved] Error: Cannot find module ‘webpack-cli/package.json‘
- How to Solve Error: Module did not self-register
- How to Fix Webpack run error webpack dev server
- Cocos creator custom engine NPM Error [How to Fix]
- [Solved] Build Error Ineffective mark-compacts near heap limit Allocation failed – JavaScript heap out of memory
- Vue require Error: node_modules/babel-loader/lib
- [Solved] webpack.config.js configuration encountered Error: Cannot find module’@babel/core’&&Cannot find module’@babel/plugin-transform-react-jsx’
- [Solved] Vue.js error: Module build failed: Error: No parser and no file path given, couldn’t infer a parser.
- [Solved] npm Error: Error: Cannot find module ‘postcss-loader‘
- [Solved] Vue + uniapp Uncaught TypeError: Cannot read property ‘getters‘ of undefined
- [Webpack Update] vue-loader Error: Compiled with problems : ERRORModule notfound: Error:Can‘ t resolve vue in
- Yaml is installed, and the error YAMLLoadWarning is reported as soon as the code runs: calling yaml.load() without Loader=… is deprecated, as the default Loader is unsafe.
- Taro Error: chunk common [mini-css-extract-plugin] Conflicting order between: ……
- Vue Cli error: vuecliYou may need an additional loader to handle
- Postgres uuid_generate_v1() does not exist [How to Solve]