开始
https://cn.vitejs.dev/
Vite 需要 Node.js 版本 18+,20+。然而,有些模板需要依赖更高的 Node 版本才能正常运行,当你的包管理器发出警告时,请注意升级你的 Node 版本。
| (base) ➜ ~ node --version
v19.5.0
(base) ➜ ~ npm --version
9.3.1
(base) ➜ ~ brew upgrade node
Running `brew update --auto-update`...
Warning: node 19.5.0 already installed
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 | npm create vite@latest hulai-vue -- --template vue
Need to install the following packages:
create-vite@5.1.0
Ok to proceed? (y) y
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'create-vite@5.1.0',
npm WARN EBADENGINE required: { node: '^18.0.0 || >=20.0.0' },
npm WARN EBADENGINE current: { node: 'v19.5.0', npm: '9.3.1' }
npm WARN EBADENGINE }
Scaffolding project in /Users/nocilantro/hulai-vue...
Done. Now run:
cd hulai-vue
npm install
npm run dev
|