Launching a Vue Cli 3.10.0 project on a designated port

Is there a way to consistently serve a Vue CLI project on a specific port, like 8888? I've tried various methods without success.

  1. Adjusting the serve script in package.json to include the flag --port 8888
  2. Updating the devServer option in vue.config.js. I set it as

    devServer: { port: 8888 }

  3. Attempting to specify the port while serving the project with a command like npm run serve -- --port 8888

Unfortunately, none of these approaches have worked for me. Can someone guide me on the correct way to achieve this?

Answer №1

Make sure to upgrade to the newest version 3.11.0

Please see the screenshot below for reference:

https://i.sstatic.net/nXeKF.png

Hopefully, this update resolves your issue.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Explore a JSON array within another JSON array

Here is a JSON format that I have: { "Project [id=1, dateDebut=2017-01-13, dateFin=2017-01-18, description=qsd, sponsor=qsd ]" : [ {"id":1,"title":"qsd ","description":"qsdqsd","dateFin":"2017-01-26"}, {"id":2,"title":"sss ","descriptio ...

How can we retrieve the clicked object in a done/fail function when using jQuery for an ajax request?

I am facing an issue with a simple ajax query that is triggered for every item of a class using the .click() event. The problem arises when trying to identify the clicked element in order to properly remove the m_action class in the .done() function. Desp ...

Is there a different npm package that can extract paragraph data since pdf2json npm package is not working properly?

After attempting to use the pdf2json npm package to extract data from a PDF, I found that it was not extracting the data into paragraphs as desired. I have a PDF document that includes tables, paragraphs, and charts, and I am looking to extract the raw da ...

How can you exclude selected values in React-select?

Here is how I have defined my select component: this.state.list = [{label: "test1", value:1}, {label:"test2", value:2}, {label:"test3", value:3}] this.state.selected = [{label:"test2", value:2}] let listMap = this.state.list let list = this.state.list { ...

Do overlay elements have to be positioned at the bottom of the HTML body every time?

As I delve into the world of JavaScript frameworks, one common trend I've noticed is that elements like dialogs, tooltips, and alerts usually appear at the end of the body tag. With my own implementation of these UI elements, I am determined to make ...

Function reference in JSDoc that is not within a class context

If I have two stand-alone functions in the structure outlined below: A/foo.ts B/bar.ts Where bar.ts contains export const happy()... And foo.ts contains /** @see happy /* How can I establish the correct linkage to bar#happy? I experimented with borr ...

Understanding how to access a variable outside of a function in Node.js can be crucial for successfully passing

I am trying to figure out how to access the TRADE_OUT variable outside of a specific function in my application. Despite my efforts, I haven't been successful so far. I need the value of TRADE_OUT to be globally accessible within the entire applicatio ...

What is the process for retrieving paginated data from the store or fetching new data from an API service within an Angular 2 application using ngrx-effects?

After coming across this insightful question and answer about the structure of paginated data in a redux store, I found myself pondering how to implement similar principles using ngrx/store in an angular 2 application. { entities: { users: { 1 ...

Oops! The Route.post() function is looking for a callback function, but instead, it received an [object Object

Looking to integrate a password reset feature in my web app, but encountering the error mentioned in the title. Here's a snippet of my code: main.js: const router = express.Router(); const AsyncNewPassword = require('./controller/asyncnewpasswor ...

Tips on how to remove the filter from a select element using Angular?

My code includes the following HTML: <select ng-options="mark.id as mark.name for mark in marks" ng-model="markSearch.mark.id"> <option value="">-- Choose mark --</option> </select> ... <tr ng-repeat-start="pipeType in pipeT ...

Exploring Object Arrays with Underscore.js

Here is an array of objects that I am working with: var items = [ { id: 1, name: "Item 1", categories: [ { id: 1, name: "Item 1 - Category 1" }, { ...

Choose a particular optgroup simultaneously using custom JavaScript

Check out this Fiddle for an example I am facing a situation where I have two different types of option groups with options. My challenge is to ensure validation between these two groups. How can I achieve this? Situation 1 If I select something from g ...

What does the JS Array Filter function return?

Is it necessary to include a return statement in the filter function when NOT using ES6 arrow syntax? Could the two separate filter functions be combined into one for efficiency? cars.filter(function(car, index) { return car[0].setAttribute("data-ori ...

I'm struggling to understand the reasoning behind the 'undefined' error occurring in the Google Maps distance service

Currently facing a puzzling issue with an 'undefined' exception. Developing a tool to track distance traveled between two locations, leveraging Google Maps distance matrix. Upon selecting a vehicle, entering an origin and destination, and clickin ...

What is the best way to upload this HTML file to create my own visual representation?

Feeling a bit unsure about which way to go for this problem, I don't have many options at the moment. Lately, I've been diving into Deep Learning and I'm interested in experimenting with Stanford's CS231N's Convolutional Neural Ne ...

Executing a method from the parent controller within nested directives by utilizing isolated scope

I need help with a treeview directive in my project. I am having trouble invoking a function from the parent controller and can't seem to figure out why it's not working. It could be due to the structure of the treeview and nesting of child eleme ...

What is the best way to convert exponential values to decimals when parsing JSON data?

var value = '{"total":2.47E-7}' var result = JSON.parse(value); Looking to convert an exponential value into decimal using JavaScript - any suggestions? ...

What is the best way to obtain the final HTML output once all scripts have been executed

Is there a way to obtain the final HTML after all scripts have been executed? The scripts on the page are adding and changing controls and CSS, and I want to see the HTML of the display as a static page. Is there a method to achieve this? Edit: For exa ...

How to retrieve documents in ElasticSearch based on field values containing or including specific values

I am attempting to retrieve documents from elastic search based on fields that include or contain dynamic text. For example: Here are some sample documents retrieved from elastic { id: 12345, name: test66, description: 'some desc231431', entity_i ...

AngularJS text markers

In order to streamline the process of managing tags with random content, I have devised a 'tag' manipulation system using the angular-ui alert mechanism. The system includes a factory and a directive as follows: Factory: app.factory( &a ...