I want to install vue for my project through npx, not globally and to be sure that I have the latest version of vue.js, just like is done in react. What is the command in the terminal to achieve that?
npx @vue/cli createVue CLI (@vue/cli) is the equivalent package, which could be run with npx like this:
npx @vue/cli create --default my-vue-app
default template is a Vue 2 project with Webpack 4. Remove --default flag for version prompts.5.0.0-rc.2 or newer) default template is a Vue 3 project with Webpack 5. Remove --default flag for version prompts.npm-init commands should be preferred instead.npm init vueThe official recommended starter:
# npm 6.x
npm init vue my-vue-app --default
# npm 7+, extra double-dash is needed:
npm init vue my-vue-app -- --default
# yarn
yarn create vue my-vue-app --default
# pnpm
pnpm create vue my-vue-app -- --default
default template is a Vue 3 project that uses Vite. Use @2 version specifier for a Vue 2 project (e.g., npm init vue@2).npm init viteA similar starter to the one from npm init vue:
# npm 6.x
npm init vite my-vue-app --template vue
# npm 7+, extra double-dash is needed:
npm init vite my-vue-app -- --template vue
# yarn
yarn create vite my-vue-app --template vue
# pnpm
pnpm create vite my-vue-app -- --template vue
vue template is a Vue 3 project. There is currently no official Vue 2 template integrated with this npm-init command.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With