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
1
vote
1 answer

unable to run command "vue create app1"

when i try to run any command at cli it gives this error: vue : File C:\Users\john\AppData\Roaming\npm\vue.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at…
john doe
  • 23
  • 4
1
vote
1 answer

vue-cli4 for multi-page use `indexPath`in `pages` config

I'm using vue-cli4 for multi-page, and I want to be able to use indexPathin pages config. How to do that?
CQ P
  • 33
  • 8
1
vote
2 answers

How to add HTML comments to index.html when doing a build in Vue CLI?

Update 1: Fixed syntax issue that caused my initial build errors. Update 2: Found my own solution using a Webpack plugin. See the accepted solution. I want to add some custom HTML comments in the public/index.html during a build. I added something…
Kevin
  • 31
  • 6
1
vote
2 answers

Why vue-cli understand I've installed vue-cli-plugin-vuetify and vuetify-loader?

When I create a fresh vue-cli project via this command vue create hello-word and this command to install vuetify vue add vuetify Then I saw my git changes like this Two new dependencies have been installed in…
Joseph
  • 3,974
  • 7
  • 34
  • 67
1
vote
0 answers

Vue Cli Error: Rule can only have one resource source (provided resource and test + include + exclude)

Npm run serve is not working after I freshly installed npm in the project folder. I am using the latest webpack. Also tried uninstalling and installing npm gloabally. Though this was running before npm install. Nothing has changes in package.json…
Leena Nichare
  • 11
  • 1
  • 3
1
vote
0 answers

node vue-cli-service not found

I have a problem with vue-cli-service. I'm a newbie to FE development, so be patient if my question is silly. Node is at version 14.9.x Os is macOS Catalina, however, the same will run inside Jenkins pipeline so the final OS will be Centos…
ozw1z5rd
  • 3,034
  • 3
  • 32
  • 49
1
vote
0 answers

@vue/cli | vue create won't work with node v12.18.3

I'm wondering if @vue/cli doesn't work with node v12.18.3 I checked the vue/cli files and found it's been using npm v.6.4.0, yet when I check my version of npm, it's v6.14.8 Explained a bit more: vue create Instantly I get this: npm…
redr0ad
  • 11
  • 2
1
vote
1 answer

With Vue-cli, when running build, how to organize files in css and js folders after the build?

By default, Vue-cli creates the files as follows: - dist -- demo.html -- style.css -- file.commom.js -- file.commom.js.map -- file.umd.js -- file.umd.js.map -- file.umd.min.js -- file.umd.min.js.map I want the files to be organized this way: -…
1
vote
0 answers

Problems with favicon not showing in Vue CLI 4.4.6 generated proyect

I'm having a big trouble with this proyect generated with the latest version of Vue CLI up to this date. The favicon does not show up, I've deleted previously the /img folder in the public folder, and added my own favicon.png to the index.html…
1
vote
1 answer

vue-cli (webpack) unexpected character

I have an issue with sass files (when I remove sass files all build process pass successfully), the error is: Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): ModuleParseError: Module parse failed: Unexpected…
Bogdan Dubyk
  • 4,756
  • 7
  • 30
  • 67
1
vote
0 answers

eslint vue-cli doesn't show errors after running npm run serve second time

I am using These packages. "@vue/cli-plugin-babel": "^4.4.6", "@vue/cli-plugin-eslint": "^4.4.6", "@vue/cli-service": "^4.4.6", "babel-eslint": "^10.1.0", "compression-webpack-plugin": "^4.0.0", "eslint": "^6.7.2", …
Nika Kurashvili
  • 6,006
  • 8
  • 57
  • 123
1
vote
1 answer

VUE/CLI .env variables returns undefined

I'm using @vue/cli 4.2.3 but when I create a .env file in my project root folder and declared a new env variable in it then print it in any component it returns undefined. My env variable is like VUE_APP_NAME=VALUE and I'm calling it…
1
vote
1 answer

How to calculate two item values in Vue.js 2.6, Vue CLI 4, Vuetify 2.2

I'm using Vuetify's current CRUD Datatable UI Component (compatible with Vue.js2) and I'm trying to calculate the subtotal of a product multiplying the product's quantity with its price using the following static data in JavaScript:…
DigitalDevGuy
  • 83
  • 4
  • 14
1
vote
1 answer

Prevent JS files from splitting into chunks (vue cli 4 + webpack)

npm run build Is creating multiple 'chunk' files, such as: /dist/js/app.*.js /dist/js/chunk-2413.js /dist/js/chunk-5133.js My goal is to have them all within a single app.*.js file! I've set 'splitChunks' to false in vue.config.js, however this…
NAMAssist
  • 321
  • 1
  • 4
  • 14
1
vote
0 answers

Error: Cannot find module 'C:\Users\emraan\AppData\Roaming\npm\node_modules\vue-cli\bin\vue'

when checking the vue version or creating a new vue project. I got error emraan> vue --version internal/modules/cjs/loader.js:800 throw err; ^ Error: Cannot find module 'C:\Users\emraan\AppData\Roaming\npm\node_modules\vue-cli\bin\vue' [90m at…
Praveen kumar
  • 11
  • 1
  • 3