Error: Cannot find module ‘commander‘

created at 07-04-2021 views: 18


error message

Error: Cannot find module 'commander'


Check the prompt of the vue-cli version, the module commander cannot be found


Method 1

Reinstall commander:npm install commander --save

Important reminder: Do not install in the directory where node is installed, otherwise it will not work;

Method 2

Install vue-cli globally,

Hint: But I tried it to no avail

created at:07-04-2021
edited at: 07-04-2021: