find module 'commander'"/>
Error: Cannot find module 'commander'
1、错误描述
C:\Users\Administrator.USER-0GUONPPBHK>vue list
internal/modules/cjs/loader.js:596throw err;^Error: Cannot find module 'commander'at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15)at Function.Module._load (internal/modules/cjs/loader.js:520:25)at Module.require (internal/modules/cjs/loader.js:650:17)at require (internal/modules/cjs/helpers.js:20:18)at Object.<anonymous> (D:\nodejs\node_modules\vue-cli\bin\vue:3:17)at Module._compile (internal/modules/cjs/loader.js:702:30)at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)at Module.load (internal/modules/cjs/loader.js:612:32)at tryModuleLoad (internal/modules/cjs/loader.js:551:12)at Function.Module._load (internal/modules/cjs/loader.js:543:3)C:\Users\Administrator.USER-0GUONPPBHK>
2、错误原因
使用vue list查看所有的可用的官方模板,出现找不到模块commander
3、解决办法
(1)直接执行安装commander模块命令
cnpm install commander --save
(2)全局安装vue-cli
npm i vue-cli -g
更多推荐
Error: Cannot find module 'commander'
发布评论