Questions tagged [vue-cli]

Vue CLI serves as the official framework for initiating and upkeeping your Vue endeavors. By providing an expansive and adaptable system, it allows users to effortlessly incorporate pre-existing plugins or create their own without any initial setup. Moreover, it ensures that your project and tooling setups remain compatible with future updates, guaranteeing long-term viability.

A guide on enabling the second selection to fill data based on the chosen option from the

Whenever I make a selection in the first dropdown, the second dropdown should dynamically update based on that option. However, although the data is successfully populated in the first dropdown, the second dropdown still does not respond. I suspect that th ...

Installing Vue CLI on Mac OS may not function correctly

I recently installed vue-cli by executing the following command: npm install -g @vue/cli /Users/me/npm/bin/vue -> /Users/me/npm/lib/node_modules/@vue/cli/bin/vue.js /Users/me/npm/lib └── @vue/<a href="/cdn-cgi/l/email-protection" class="__cf_ ...

Unspecified values for environment variables in Vue-cli 3 causing errors

Despite trying numerous solutions, I am still unable to make it work. My aim is to store some values in a .env file within my Vue app. However, when attempting to log process.env from within the component, it returns an empty object. Contents of my .env f ...

What could be causing Vue Material dialogs to frequently slide off the screen?

I am currently utilizing a dialog feature from Vue Material (). After following the link and opening the first custom dialog on the page, I noticed that it tends to shift towards the top left of my screen, making only a portion of the dialog visible. This ...

What is preventing me from updating specific packages to the latest version using vue ui / npm?

Currently, I am utilizing Vue CLI and have been using the command vue ui to facilitate updating npm packages. Upon executing this command, I encountered a particular screen as displayed in the following image: https://i.stack.imgur.com/6cDlI.png I am see ...

The Vue-cli Webpack template is experiencing issues with correctly serving static fonts

Within my configuration file index.js, specifically in the build section, I have specified: assetsSubDirectory: 'static', assetsPublicPath: '/path/to/subdirectory/', This means that the static fonts sourced from a theme template imported within node_modu ...

What is the proper way to deploy a Vue App after it has been built?

After deploying my Vue App on a hosting platform, I noticed an issue. When I try to access "www.mydomain.com/about" directly in the browser, I receive a 404 Error Page. This made me wonder if I deployed the wrong thing. I ran npm run build before deployin ...

What is the best way to send information to a component using Props in Vue2?

Recently, I created a .Vue file to showcase information about a cafe on the Cafe Details Page. However, to streamline template updates, I decided to extract certain parts of this details page and turn it into its own component. This led me to create a new ...

Can you provide guidance on integrating stylus-resources-loader with Vue CLI 3?

It seems like modifying vue.config.js is the key to achieving my desired configuration. However, I've encountered issues when directly pasting the desired config into the configureWebpack object. Has anyone else successfully solved this problem? Here ...

What is the best way to check a configuration setting in vue.config.js from srcmain.ts?

I am updating my vue application to include code that will automatically redirect from HTTP to HTTPS when accessing the page. (I understand that configuring this in the webserver is a better practice, but it doesn't hurt to be extra cautious) if (loc ...

Struggling with resolving a system error that popped up during the installation of Vue CLI in Node? You may have encountered the message "A system

After installing npm 9.2.0 and nodev16.16.0 on my Windows 7 system, I attempted to install vue cli but encountered an error message when trying to check the version of the vue cli. Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporati ...

Utilizing a dropdown selection feature in VueJS to dynamically adjust text color

I need to implement a feature that changes the color of text based on the selection from a drop-down menu in my TODO List project. The drop-down menu consists of three options: High Urgency (text turns red), Medium Urgency (text turns yellow), and Low Ur ...

Issue: Unable to locate the module 'babel-code-frame' in VUEJS (ESLINT)

Here are the current versions: -npm: 6.14.4 -node: v10.19.0 -eslint: v5.0.1 -linux: ubuntu 20.04 This is my script: vue create vue1 cd vue1 npm run serve This is my package.json: { "name": "vue1", "version": "0. ...

Error: Unexpected token '<' encountered in Vue causing SyntaxErrorParsed: the parser expected an expression but found '<' instead

While working on my Vue project in my local environment (running the npm run dev command), I encountered an issue. When the first page loads, there are no errors. However, upon hitting the refresh button, the console displays a "SyntaxError: expected expre ...

Differences between code executed during compilation and code executed during runtime

As a newcomer to Vue and Webpack, I recently created a static web app using vue-cli and have been experimenting with it. In the file src/components/hello.vue, I came across this code snippet: export default { name: 'hello', data () { return { ...

Customize the asset path location in Webpack

I am currently working on a Vue application that utilizes Webpack for code minimization. Is there a method to dissect the chunks and adjust the base path from which webpack retrieves the assets? For example, by default webpack fetches assets from "/js" o ...

npm fails with the error message 'ERR! callback() was not invoked'

While attempting to set up vue-cli on my system, I encountered an issue with the installation process. npm install -g @vue/cli The error message I received was: Unhandled rejection Error: EACCES: permission denied, mkdir '/home/moeketsi/.npm/_cacache/ ...

When using vue-cli, it does not automatically generate the folder structure

Currently, I am using vue 3.5.1 on my Ubuntu system. Once I installed the latest version by running: npm install -g @vue/cli I proceeded to create a new project with the command: vue create appname However, I noticed that vue only generated two files w ...

What are the steps for setting up vue-cli on a server?

I have been researching how to install vue-cli. All the tutorials I found show it getting installed on the localhost:8080. Is it not possible to install it on a server? I attempted to install vue-cli on port 8080 on my server, but it ended up being on po ...

Can you explain the distinction between the views and components directories within a Vue project?

After using the command line (CLI) to set up a Vue.js project, I noticed that the CLI automatically created both a src/components and src/views folder. It has been quite some time since I last worked on a Vue project, so this folder structure is unfamilia ...

The function cb() was never executed during the installation of @vue/cli

Hey everyone, I'm new to this and currently facing an issue while trying to set up vue cli for frontend development using npm. After running sudo npm install -g @vue/cli, the following output shows up: [18:00 vue]$ sudo npm install -g @vue/cli npm W ...

It is not possible to rely on Vuex to retrieve data for every single component

Is it possible to fetch data in App.vue and pass the value to this.store.data so that it can be used for all other components? The issue I am facing is that when I click on the link (router-link), the function inside the components runs before fetching dat ...

Achieving JSX rendering in Vue.js with TypeScript starting from a basic CLI setup along with the JSX package integration

The Setup I have set up a new project using the vue-cli, where I manually selected certain features including Babel, TypeScript, Vuex, and Linter / Formatter. Additionally, I chose version 2.x and opted to use Babel alongside TypeScript for modern mode an ...

Using the v-for directive in Vue.js to loop through an array and display

Looking at the image provided, I am trying to access the content. I attempted to do so using element.comments.content, but it did not seem to work as expected. Here is the snippet of code: <div class="fil-actualites-container"> <div cl ...

Developing various VueJS TypeScript projects utilizing a shared library

In the process of developing two VueJS applications using TypeScript, I have created one for public use and another as an admin tool exclusively for my own use. Both applications are being built and tested using vue-cli with a simple npm run serve command. ...

Having difficulty setting up a Vue app due to an error message indicating that an outdated version of NPM is being used, despite having already updated to the latest version

Details about my setup: I'm currently running Ubuntu 22.04.3 with Node Version: v18.18.2, NPM Version: 10.2.1, and Vue version: @vue/cli 5.0.8. To manage Node, I used NVM. Initially, the npm version was 9.x, so I updated it to 10.2.1. Following that ...

Unable to launch Vue application in a production environment

Recently, I attempted to launch a Vue application in a production environment. Following the execution of the "npm run build" command, I proceeded to transfer both the "index.html" and "dist" files into my apache root directory. However, upon attempting to ...

Building a framework for combined frontend and backend plugins using Vue and Express

Currently, I am facing a challenge with my repository which contains a Vue CLI-generated frontend application and an Express backend application. The setup involves a standard Vue CLI app with a top-level backend src folder. The Express app defines various ...

Exploring the power of Vue CLI service in conjunction with TypeScript

I've recently set up a Vue project using the Vue CLI, but now I am looking to incorporate TypeScript into it. While exploring options, I came across this helpful guide. However, it suggests adding a Webpack configuration and replacing vue-cli-service ...

Exploring the World of Vue.js Object Imports

I am currently encountering an issue involving the importing of Objects from App.vue into a component. To provide context, this project consists of a Navigation Drawer component and an App.vue file. The Navigation Drawer contains Vue props that can be dyna ...

Vue CLI's build process encounters issues specifically related to Bootstrap Vue Next

I am currently in the process of migrating an application from Vue 2 to Vue 3 using the composition API. In our previous version, we were utilizing Bootstrap, but after some research, I discovered that it would be more suitable to switch to bootstrap-vue- ...

I am encountering issues with Axios when bundled with electron - what steps can I take to troubleshoot a compiled exe with electron?

I recently developed a VUE JS application that consumes data from a News API endpoint. To achieve this, I utilized Axios for fetching the data as shown below: import axios from "axios"; let baseURL = `https://newsapi.org/v2`; let apiKey = process ...

Steps for deploying an npm project to Heroku

Currently, I have an npm project created with vue-cli and a socket.io server. This is the structure of my project: Project/ |--node_server/ | |--server.js |--src/ | |--main.js | |--App.vue | |--other .vue files and folders I am facing difficulties d ...

Error message "Vue CLI project setup encountering ENOENT error: file or directory does not exist"

I'm currently in the process of creating a new Vue.js app, and I've executed the following command: vue create client After that, I opted for the default template: default (babel, eslint) However, during the setup process, it abruptly stops with this e ...

Leveraging Environment Variables in Vue.js

I've been diving into the official documentation, but haven't come across any information regarding environment variables. While there are community projects that offer support for this feature, they seem a bit excessive for my needs. I'm cu ...

The .env file is functioning properly for the current keys, but any new ones I include remain undefined

Recently, I took over a Vue application that utilizes axios. Within the dataService.js file, it retrieves URLs from a project's .env file using process.env.FOO_BAR for GET requests. The pre-existing key-value pairs such as VUE_APP_DATA_URL function proper ...

Is the Webpack vendors JS bundle in Vue CLI containing unlisted code that is not in the dependencies or package-lock.json file?

An information security auditing tool flagged an outdated library with known vulnerabilities in our webpack-bundled chunk-vendors.js file generated using Vue CLI: The library in question is YUI 2.9.0. It appears that this library is not fully included, a ...

[Vuetify alert]: The server-side rendered virtual DOM structure does not align with the client-side content (Nuxt, Vue, and lerna monorepo)

I am currently facing an issue while attempting to run a basic Nuxt application within a lerna monorepo, which includes an external Vue component constructed using vue-cli. Initially, the page displays the content of the component (rendered by the server) ...

The build process encountered an error due to the absence of ESLint configuration after the import

Having recently worked on a Vue project created using Vue CLI, I found that eslint was also included in the project. Although I haven't utilized eslint much up to this point, I understand that it is beneficial for catching stylistic errors, semantic e ...

Enhancing the default vue-cli webpack app with additional components

To ensure reproducibility, I began by setting up a basic project using vue-cli: npm install -g vue-cli vue init webpack spa cd spa npm install npm run dev Afterwards, I decided to swap out the Vue logo with an app-header component. Here's how I implement ...

How can I efficiently include all css from node_modules in vuejs?

For my Vue.js app built with the webpack template and vuetify, I am starting by importing the vuetify css in my App.vue. <style> @import '../node_modules/vuetify/dist/vuetify.min.css' </style> I'm wondering if this is the correct or only ...

Guide on creating an alias in webpack within vue-cli4?

Is there an alternative method for setting the alias in vue-cli4 since there is no webpack.base.conf.js file? Thank you! ...

Heroku Woes: Vue-CLI Deployment Woes

I have been facing persistent challenges while trying to deploy my Node.js application with a Vue.js frontend on Heroku. Despite numerous attempts and different configurations, my builds consistently fail due to module resolution errors. Application Infor ...

When a new VueJS project is created, it failed to automatically install the necessary basic HTML files and folders

Hey there, I am completely new to Vue.js. Just recently, I installed the Vue.js/CLI and created a brand new project using vue create test. This prompted me to choose from three options: > Default ([Vue 2] babel, eslint) Default (Vue 3 Preview) ([Vue 3 ...

Different file paths in the 'public' directory using VUE CLI

My current application architecture is structured as follows: Within the 'frontend' folder, I have my applications. The 'html' folder contains the single page application (spa) that was constructed. Inside the 'spa' directory, ...

What is the best way to send the image location to a child component in Vue?

Having trouble displaying my image for some reason. I have the image path sent to the component for rendering, but it just won't show up. I am using Vue-CLI for this project. This is how my folders are structured: src | App.vue | bulbasaur.png | /compo ...

Is there a way to turn off linting while utilizing vue-cli serve?

I am currently running my project using vue-cli by executing the following command: vue-cli-service serve --open Is there a way to stop all linting? It seems like it's re-linting every time I save, and it significantly slows down the process of making ...

Add custom scripts to individual components within a Vue.js application

After extensive searching, I still can't seem to find a solution to my current issue. My focus is on a Vue project with vue-cli, where I need to inject various scripts into different pages (leveraging vue-router). Here are more specific details: This is ...

Utilizing Chart.js with Vue for dynamic time axis plots from JSON data through computed properties

Trying to generate a chart with a time axis in Vue using Chart.js has been a challenge. Initially, everything worked perfectly when the data was set directly in the Data object as shown below: chartData: { datasets: [ { backgroundC ...

when reloading the browser, clear the console with webpack vue cli

Is there a way to configure the vue-cli-service, which utilizes webpack, to automatically clear the browser's console upon hot reload? Having old and irrelevant messages cluttering the console log after each save can be inefficient. It would be helpful to ...

When attempting to define a route as a lambda function in vue-cli, the default lazy load code does not function

After using vue-cli to set up a new Typescript project with vue-router included, I noticed that the generated router/index.ts configuration looked like this: const routes: Array<RouteConfig> = [ { path: '/', name: 'Home' ...

The installation of vue-cli failed due to permission issues with error code EPERM in npm

I keep encountering an error message when I try to run npm install -g vue-cli: npm ERR! path C:\Users\End User\AppData\Roaming\npm\node_modules\vue-cli\node_modules\nan\package.json npm ERR! code EPERM ...

What is causing the error when running `npm run serve` on WSL using vue-cli?

Running npm run serve for my vue.js app on Windows Subsystem for Linux (WSL) leads to the following error: > [email protected] serve > vue-cli-service serve INFO Starting development server... 98% after emitting CopyPlugin ERROR Failed to ...

I'm having trouble launching the Vue UI after successfully installing the Vue CLI - any ideas why?

After installing the following versions: node 8.11.2 npm 6.3.0 I proceeded to install the Vue CLI (@vue/[email protected]): npm i -g @vue/cli However, upon running the command below: vue ui An error message was displayed as follows: Error: Cann ...

Can someone explain why v-for is unable to display the computed value?

When selecting a city and area, the data should be filtered accordingly. However, I am facing an issue where the selected value does not appear. I have tried various solutions and searched for similar code, but I have yet to find a resolution. Below is a ...

The route parameters in Vue SSR are being retrieved from a separate request

I am currently using Akryum/vue-cli-plugin-ssr along with vue-cli, but I have encountered an unusual issue in my Vue SSR application. It seems that the route params are getting mixed up with requests made either before or in parallel to the current one. F ...

The Vue CLI project, using Typescript, is facing challenges with building and running Mocha tests

My Vue 2 project, created using Vue CLi, is encountering numerous errors. While it compiles fine for development purposes, running unit tests or building for production results in a cascade of issues. Displayed below are some sample errors, along with sni ...

Setting timeouts during Vue-cli unit testing can help improve the efficiency and accuracy of your tests

I have been running vue unit tests using the following command: vue-cli-service test:unit However, I am encountering an issue where some unit tests require a response from the server, causing them to take longer to execute. Is there a way for me to man ...

Module not found, missing module error #557

Upon completing the command npm install -g @vue/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="482b2421087b66786678652a2d3c296671">[email protected]</a>, I proceeded with the command vue create client and encount ...

Tips for resolving the error message: 'The "path" argument must be a string. Received type undefined' that occurs when executing 'vue add vuetify'

After successfully creating a new app using 'vue create agenda', I proceeded to cd into the project folder and run 'vue add vuetify' to integrate Vuetify. However, I encountered an unexpected error. I attempted to search for solutions ...

Lazy loading with Vue router seems to be having issues within the Vite environment, as an error is being thrown mentioning an unknown

I have successfully implemented the code below in Vue router and it works flawlessly in Vue-CLI. import store from "./../../store/index.js"; function getView(view) { return () => import(`@/views/settings/${vi ...

How can I include npm package js and css files in Vue CLI with webpack?

I am currently attempting to integrate an npm package into my vue-cli development site. The instructions provided by the package website are as follows: https://i.stack.imgur.com/R2Inl.png The instructions state that both the css and js files need to be ...

Inject SCSS variables into Typescript in Vue 2 Using Vue-cli 5

When working on my Vue 2 project (created using the Vue-cli v4), I successfully imported variables from my SCSS file into my typescript (.vue files) without any issues. I had the :export { ... } in my SCSS file _variables.scss, along with shims.scss.d.ts ...

Setting up Vue CLI 4 with ESLint, TypeScript, Stylelint for SCSS, and Airbnb rules in the VS Code editor with automatic fixes on save

After struggling with configuring Vue CLI 4 with ESLint, Prettier, Airbnb rules, TypeScript, and Vetur, I found myself at a crossroads. The challenges continued to mount as the nature of the problem evolved from my previous attempts.: How to configure Vue ...

Vue 2 enhanced with vue-cli, vue-property-decorator, and vue-class-component, featuring the elegant Vuetify design system, undergoing a seamless migration to the latest

I have undertaken a project to upgrade from Vue 2 to Vue 3. Following the Vue migration documents, the codebase has been updated: . There seems to be a mismatch with the libraries mentioned above. Is there anyone with a running project who would be willing ...

Tips on including a CDN stylesheet into the Cypress component test runner

Within my vue-cli project, I have successfully set up the cypress component test runner by following the official documentation available at . However, I am facing an issue with using icon fonts that are loaded into my app via CDN links (specifically fonta ...