npm Error: Cannot find module

有可能是路径错误。你看下看看他输入的路径是不是没有找到vue 模块

用下面的语句设置nodjs默认路径

npm config set prefix "D:\nodejs\node_global"
npm config set cache "D:\nodejs\node_cache"

npm list -global

看路径是否改变

 

升级VUe

npm install -g @vue/cli --force 升级时需要加--force

否则无法升级成功 with --force to overwrite files recklessly.

 

 开始创建项目

dos 命令
跳转到指定目录 cd 盘符:/路径
vue create 项目名称

 

相关文章:

  • 2021-08-02
  • 2021-12-20
  • 2022-02-17
  • 2021-08-29
  • 2021-04-06
  • 2021-06-26
  • 2021-05-10
  • 2022-12-23
猜你喜欢
  • 2021-06-10
  • 2021-07-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-12
  • 2021-06-26
相关资源
相似解决方案