Questions tagged [vue-cli-3]

Vue-CLI provides the vue command in your terminal. It provides the ability to quickly scaffold a new project via vue create, or instantly prototype new ideas via vue serve. Use this tag for questions specific to version 3.

Vue CLI, created and maintained by the Vue's core team, is the official tooling for bootstrapping and maintaining your Vue projects.

Offering a feature rich and extensible platform for using (or developing your own) plugins and preset in zero-configuration and easily configurable fashion, as well as future-proofing the upgradebility of your project and tooling configurations.

Vue CLI ecosystem currently offers these Core Plugins:

  • @vue/cli-plugin-babel
  • @vue/cli-plugin-typescript
  • @vue/cli-plugin-eslint
  • @vue/cli-plugin-pwa
  • @vue/cli-plugin-unit-jest
  • @vue/cli-plugin-unit-mocha
  • @vue/cli-plugin-e2e-cypress
  • @vue/cli-plugin-e2e-nightwatch

There's a community site Awesome Vue CLI packages for browsing all the plugins and presets available.

Use this tag for questions specific to version 3.

695 questions
14
votes
6 answers

"Cannot read property 'upgrade' of undefined" when starting vue application

I have a project that's been running perfectly for a few months now, able to run npm run serve with no problem. I have to terminate and run the command again whenever I switch networks, but that has never been a problem and the server could always…
kkontagion
  • 456
  • 1
  • 3
  • 12
14
votes
5 answers

How to configure environment variables with vue-cli 3?

i try to use environment variables in vue-cli, but is not working, everytime says 'undefined' when use console.log(process.env.VUE_APP_BASE_URI). But process.env.NODE_ENV says 'development' as i defined in webpack.config.js. I read the documentation…
Isaías Orozco Toledo
  • 1,919
  • 5
  • 19
  • 35
13
votes
3 answers

Error: Cannot find module '@vue/babel-preset-app'

When I create a new vue application, and I run the server I get an error, after the compilation failed. Does anyone have where the problem comes from? Here is a screen shot of my Terminal and my browser. The main.js file import Vue from…
Madi Naf
  • 655
  • 1
  • 6
  • 19
13
votes
2 answers

Vue cli 3 project ,dynamic src in image path not working

I am referencing an image url in a vue component like Vue logo this works but while trying Vue logo data() { return { imgPath: "~statics/reports/logo.png" }; }, …
Sainath S.R
  • 3,074
  • 9
  • 41
  • 72
13
votes
2 answers

VUE CLI-3 Project not working on IE-11

I have created an project in vuejs using vue-cli3. It working fine on chrome browser but in IE-11 version blank screen is shown with the following error in console as mentioned in this link:…
Sukhpal Singh
  • 525
  • 1
  • 9
  • 29
12
votes
1 answer

Vue devServer proxy is not helping, I still get CORS error

I'm using @vue/cli 3.x and in my vue.config.js I have this: devServer: { proxy: { "/api": { ws: true, changeOrigin: true, target: "http://localhost:8080" } } } But I keep getting CORS error: Access to…
Tomer
  • 17,787
  • 15
  • 78
  • 137
12
votes
2 answers

How to sync states between backend and frontend using vuex and vue-router?

I am developing a single-page-application using vue-cli3 and npm. The problem: Populating a basic integer value (stored in a vuex state) named counter which was incremented/decremented in the backend to the frontend, which displays the new…
sebikolon
  • 121
  • 1
  • 7
12
votes
3 answers

Sharing assets and components between Vue projects

I have 2 Vue applications and they both need to use some common pages and assets (scss files, icons etc.). The pages they need to share are full pages with access to vuex store and async calls. What I think to do is to create a single vue app (with…
Tomer
  • 17,787
  • 15
  • 78
  • 137
12
votes
2 answers

VueJS + Typescript: Property does not exist on type

I created a simple Vue app using vue-cli 3 and configured with TypeScript. I also installed axios and I'm trying to use it in mounted() in order to load data and display it in a component. Here's the code: