Questions tagged [vue-cli-4]

Vue CLI 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 fashion, as well as future-proofing the upgradebility of your project and tooling configurations. Use this tag for questions specific to version 4.

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 4.

112 questions
4
votes
1 answer

Runtime Error integrating a component lib that uses @vue/composition-api: 'You must use this function within the "setup()" method'

Any help with the following problem would be greatly appreciated! Situation: My project contains two packages: child-component-lib contains a single view About.vue written in composition-API-style (with vue2 helper libraries @vue/composition-api…
Thomas
  • 2,155
  • 16
  • 22
4
votes
1 answer

How to delete row from datatable without interfering a computed function using a click event in vue.js

I am making a shopping cart using Vuetify's current CRUD Datatable UI Component (compatible with Vue.js2). I previously had a problem to calculate the total of a product by multiplying the product's quantity with its price. Fortunately, I was given…
DigitalDevGuy
  • 83
  • 4
  • 14
4
votes
2 answers

Getting error after successfully installiong axios vue plugin

so I wanted to add Axios to a Vue project. I did that by issuing vue add axios. It told me, the installation was successful but then I somehow get 5 errors. I don't fully get why it tells me it was installed when it seems there are still some jobs…
xotix
  • 494
  • 1
  • 13
  • 41
3
votes
0 answers

Vue Cli and Vue.js v3 script setup

I am already successfully using Vue.js v3 by creating a project with Vue CLI or with Vite. Now I need to have just single .vue files that I can run and build individually. I read this is possible just by using "vue serve myfile.vue" and "vue build…
VdfX89
  • 73
  • 6
3
votes
2 answers

How to print a specific element in Vue 3?

I'm working on a project where I want the functionallity to print a specific element of my page. There is a mixin/plugin called VueHtmlToPaper that does exactly what I want but I have trouble importing it into my Vue 3 CLI project since it was…
Pazulay
  • 215
  • 1
  • 3
  • 11
3
votes
2 answers

Error: You cannot call "get" on a collection with no paths. Instead, check the "length" property first to verify at least 1 path exists

My CLI version is 4.5.8. I'm trying to install Vuetify but this error is showing up. Some please hep me to fix this error. >vue add vuetify � Installing vue-cli-plugin-vuetify... + vue-cli-plugin-vuetify@2.0.7 updated 1 package in 27.591s 63…
Nishanth
  • 95
  • 2
  • 8
3
votes
0 answers

Vue-Cli create project failed

Emenvironment Windows 10 wsl -> Ubuntu 18.04.4 LTS node v8.10.0 npm v6.14.4 Vue CLI v4.3.1 Scene When I use vue create my-project to create a new project, I select the following options: however, no matter how hard I try, it stops here:
3
votes
1 answer

Prevent specific .vue components from being bundled

Problem: In my vue-cli 4 app, I'd like to have build: script, which generates production bundle, with specific .vue-components not being included in some cases. In other cases they should be included. Also, these components are stored in app itself…
KrasnokutskiyEA
  • 587
  • 1
  • 6
  • 20
3
votes
2 answers

Globally load Sass/Scss into a Vue Project

So, when I was using Vue-cli 3.X I used a method similar to This Thread to load my many style files globally. However, I have upgraded to Vue-cli 4.X and since then, have been unable to use this technique. I just get this…
KJParker
  • 710
  • 2
  • 9
  • 26
2
votes
1 answer

Vue CLI with electron - Unexpected character (1:0) when using native modules

In some popular NodeJS libraries, e.g. ssh2 or node-pty, there is natively compiled code as part of the library. Creating the project with vue create my-project vue add electron-builder yarn add ssh2 then importing and using ssh2's Client in the…
Alex Pakka
  • 9,466
  • 3
  • 45
  • 69
2
votes
1 answer

Vue 3 with vue cli and TS project don't see swiper 7

I installed Swiper 7 to vue3 project with TS, created via vue CLI: here is my ts.config: "compilerOptions": { "target": "esnext", "module": "esnext", "strict": true, "noImplicitAny": false, "jsx": "preserve", …
2
votes
2 answers

Can Vue CLI build a library for Vue 3?

I would like to build a Vue library using Vue CLI. The project prefers a built library over a fully built app. The library build works, but the library does not work in combination with Vue 3. Let me elaborate... First create a simple Vue 3…
Jorr.it
  • 1,222
  • 1
  • 14
  • 25
2
votes
1 answer

Why does webpack compile successfully but my source code does not exist in the compiled output?

I use vue-cli-service serve to compile scss and bundle the output This is my webpack configuration inside vue.config.js configureWebpack: { entry: { main: [`${process.cwd()}/src/main.js`], app: [`${process.cwd()}/src/vue.js`] …
movileanuv
  • 350
  • 1
  • 12
2
votes
1 answer

You are trying to use "scss". node-sass is missing

My project is running node-sass but I decided to change that to sass (dart-sass) because I want to avoid installing python, g++ and make just to run npm install, which node-sass forces you to do because of node-gyp. So I ran $ npm uninstall…
user10706046
2
votes
1 answer

Vue CLI deploy to a subfolder using relative paths

Using Vue CLI, and Vue 2. Anyone knows how to build the project using relative paths, so I can place it in any subfolder in my server and it will work? (for example www.mysite.com/subfolder/) I've tried with // vue.config.js module.exports = { …
germi
  • 95
  • 5