1.输入npm install –g @vue/cli 报错
C:UserAdmin>npm install –g @vue/cli
npm WARN config global `–global`, `–local` are deprecated. Use `–location=global` instead.
npm WARN deprecated source–map–url@0.4.1: See https://github.com/lydell/source–map–url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated source-map–resolve@0.5.3: See https://github.com/lydell/source-map–resolve#deprecated
npm WARN deprecated resolve–url@0.2.1: https://github.com/lydell/resolve–url#deprecated
npm WARN deprecated subscriptions-transport–ws@0.11.0: The `subscriptions-transport–ws` package is no longer maintained. We recommend you use `graphql–ws` instead. For help migrating Apollo software to `graphql–ws`, see https://www.apollographql.com/docs/apollo–server/data/subscriptions/#switching–from-subscriptions-transport–ws For general help using `graphql-ws`, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md
npm ERR! code EEXIST
npm ERR! path C:UsersAdminAppDataRoamingnpmvue.cmd
npm ERR! EEXIST: file already exists
npm ERR! File exists: C:UsersAdminAppDataRoamingnpmvue.cmd
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with —force to overwrite files recklessly.
npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersAdminAppDataLocalnpm-cache_logs2022-11-06T01_20_35_702Z-debug-0.log
2.一定要注意标红的,本博主当时就是由于没有注意就走了很多弯路,这个红色的就是再给你提示,你没有配置vue的环境变量
3.以下就是我的配置方法: