请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

请问和上一节是什么关系?推荐用哪种?另外麻烦老师提供一下项目用的node的版本,谢谢

你好,想请问一下3-2 使用 create-vue 创建 vue3 项目和3-3 使用 vite 创建 vue3 项目是什么关系?是都可以随便用哪个创建都可以吗?推荐用哪种?另外麻烦老师提供一下项目所用node版本,谢谢

正在回答

插入代码

1回答

这是两种创建 vue3 项目的方式,我们项目是用 create-vue 方式,也就是官网推荐的 npm init vue@latest 命令创建的,推荐使用这个方式来创建哈~另外官网推荐的 16.0 或以上版本的 nodejs

1 回复 有任何疑惑可以回复我~
  • 提问者 不明滚动物体 #1
    非常感谢!
    回复 有任何疑惑可以回复我~ 2023-02-12 21:53:52
  • 提问者 不明滚动物体 #2
    好的,我发现我用npm8+的话只能用3-2的方法,3-3的不行,会报错
    E:\code\muke>npm init vite@latset ele-h5 -- --template vue
    npm ERR! code ETARGET
    npm ERR! notarget No matching version found for create-vite@latset.
    npm ERR! notarget In most cases you or one of your dependencies are requesting
    npm ERR! notarget a package version that doesn't exist.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     C:\Users\yu\AppData\Local\npm-cache\_logs\2023-02-12T13_26_54_809Z-debug.log
    
    E:\code\muke>npm -v
    8.1.2
    回复 有任何疑惑可以回复我~ 2023-02-12 21:55:36
  • one_pieces 回复 提问者 不明滚动物体 #3
    vite 的官网的 npm 命令改成 npm create 了,可以试试用 npm create vite@latset ele-h5 -- --template vue
    回复 有任何疑惑可以回复我~ 2023-02-12 22:19:35
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信