PyCharm下创建vue项目

 

1.安装node.js
确保在机器上安装了node.js
安装步骤请参考:

https://www.cnblogs.com/hxlasky/p/18220337

 

 

C:\Users\Administrator>node -v
v20.14.0

C:\Users\Administrator>npm -v
10.7.0

 

2.运行以下命令来全局安装 Vue CLI:
C:\Users\Administrator>npm install -g vue-cli
若有提示错误,可以加上--force选择项目

 

3.安装git

 

C:\Users\Administrator>git -v
git version 2.40.1.windows.1

 

官网选择对应的版本进行安装

https://git-scm.com/download/win

 

 

 

3.PyCharm添加vue插件

 

 

 


4.创建项目

 

 

 

 

 

 

 

 

 

 

 

 

 


5.执行如下命令

npm run dev

 

6.浏览器访问

 

 

7.安装viewui

https://www.cnblogs.com/hxlasky/p/18233495

 

8.发现错误

ESLint:TypeError: this.options.parse is not a function

发现package.json里面的eslint是这样的:

 

    "eslint": "^8.22.0",
    "eslint-config-standard": "^10.2.1",
    "eslint-friendly-formatter": "^3.0.0",
    "eslint-loader": "^1.7.1",
    "eslint-plugin-import": "^2.7.0",
    "eslint-plugin-node": "^11.1.0",
    "eslint-plugin-promise": "^3.4.0",
    "eslint-plugin-standard": "^3.0.1",
    "eslint-plugin-vue": "^4.0.0",

 

 

删除项目重新安装好像就正常了,eslint是这样的:

    "eslint": "^4.15.0",
    "eslint-config-standard": "^10.2.1",
    "eslint-friendly-formatter": "^3.0.0",
    "eslint-loader": "^1.7.1",
    "eslint-plugin-import": "^2.7.0",
    "eslint-plugin-node": "^5.2.0",
    "eslint-plugin-promise": "^3.4.0",
    "eslint-plugin-standard": "^3.0.1",
    "eslint-plugin-vue": "^4.0.0",

 

posted @ 2024-05-29 17:01  slnngk  阅读(440)  评论(0编辑  收藏  举报