现将镜像源更换为国内的。
npm config set registry https://registry.npmmirror.com
通过下述指令查看是否更换成功
npm config get registry
创建一个vue应用
npm create vue@latest
之后添加之际的项目名称,根据实际需要添加项目脚手架工具。
✔ Project name: … <your-project-name>
✔ Add TypeScript? … No / Yes
✔ Add JSX Support? … No / Yes
✔ Add Vue Router for Single Page Application development? … No / Yes
✔ Add Pinia for state management? … No / Yes
✔ Add Vitest for Unit testing? … No / Yes
✔ Add an End-to-End Testing Solution? … No / Cypress / Nightwatch / Playwright
✔ Add ESLint for code quality? … No / Yes
✔ Add Prettier for code formatting? … No / Yes
✔ Add Vue DevTools 7 extension for debugging? (experimental) … No / Yes
Scaffolding project in ./<your-project-name>...
Done.
创建完成后,依次安装node依赖,启动node。
npm install
npm run dev
启动完成后,按照提示访问 http://localhost:5173/ 页面出现vue的logo的时候,就是安装成功了。




还没有评论,来说两句吧...