Error message "Trying to access a property of undefined (reading 'type') in Vue-cli with [eslint]"

After installing Vue cli, I attempted to run the npm run serve command without writing any code. However, I encountered an error. Can anyone provide assistance with this issue?

I have confirmed that I am using the latest version of Node Js. Despite reinstalling Nodejs, the error persists, leading me to believe it may not be related to Nodejs after all.

Answer №1

Today I came across the same issue. It seems that the problem is related to the latest version of esquery (1.4.1). To resolve this, simply revert back to a previous version of esquery. You can accomplish this by:

npm install --save-dev <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7b0e080a0e1e09023b4a554f554b">[email protected]</a>

Make sure not to remove or update the '^' from "esquery": "^1.4.0" in package.json afterwards.

Answer №2

There seems to be a bug with esquery. You can find more information about the issue here: https://github.com/estools/esquery/issues/135

If you are using yarn, you can solve the problem by specifying a specific version of the package (esquery) in your package.json. This will bypass the problematic version and make use of the specified version.

"resolutions": {
    "esquery": "1.4.0"
},

For npm users, you can replace resolutions with overrides: https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides

To understand how resolution works, refer to this link:

Answer №3

I wanted to express my gratitude for your helpful responses. Following my inquiry, I decided to reinstall the Vue CLI project. However, this time I opted for the default settings instead of using the Airbnb settings from my previous installation. This approach ultimately led to resolving the issue at hand.

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

Angular routing within a modal box

I currently have two functioning routes: app.config(['$routeProvider', '$locationProvider', function( $routeProvider, $locationProvider) { $routeProvider. when("/list/:class", { controller: "listController", t ...

When utilizing d3.js, the projection.rotate() function will yield the value [NaN, 0, 0]

I'm trying to rotate the globe canvas using projection.rotate(), but it's returning a value of [NaN, 0, 0]. <template lang="html"> <div class="map" style="width:100vw;height:100vh"> <canvas id=&q ...

What is the process for determining the files array in the nx dep-graph?

With each new release of NX v16.1.4, the file node_modules/.cache/nx/nxdeps.json is created. The structure of this file differs from the one generated by nx graph. In previous versions up to 16.1., the file contained an array named nodes.<app/lib>.d ...

Difficulty in detecting variable modifications during testing - Angular2+

After successful login, I expect a certain variable to be updated with the appropriate value. However, during testing, all I see is 'undefined' returned. This variable does change when interacting with the app, showing an error message like &apo ...

Verify if a set of Radio buttons contains at least one option selected

Need help with validating a Feedback Form using either JQuery or Javascript. The requirement is to ensure that every group of radio-buttons has one option selected before the form can be submitted. Below is the code snippet from form.html: <form id=&ap ...

Looking for a Hack to Integrate a Music Player into Your Website?

Currently, I am utilizing the Jplayer plugin from JQuery to incorporate an Audio player into my website. I have come across a situation where: If the user is not currently listening to any music while browsing the website, the page can load without any i ...

Steps for aligning items in a column horizontally in Bootstrap 5

After creating a Grid system with only 2 columns, I placed text in the first column and a carousel in the second. Despite setting a custom size for the carousel image, I'm facing difficulty centering it horizontally within the column. .title-sec { ...

Issue: The initiation function fails to start data

I have created an app using Ionic framework that displays articles. When a single article is opened, I use the init function in the UserService to initialize user data: angular.module('coop.services') .factory('UserService', function( ...

Interacting with various cookies created from user-provided input (specifically from textboxes) simultaneously

I'm facing a challenging problem and I'm in need of some assistance. The task at hand is to create three text boxes for users to input values for cookies named: name, city, and hobby. Then, using a single button with an onclick event, a function ...

Is there a way to invoke a C# function from Node.JS or JavaScript?

I am curious about the possibility of calling a C# function from JavaScript, like in the example below. Can this be achieved in any way to allow the csharpfunction to utilize its capabilities with doubles, Int32, and other C# types for calculations? (I am ...

Create and Send Interactive Form Fields using JavaScript

After a user takes an action, I dynamically generate this form using JavaScript: <form id="editBookForm" onsubmit="editBookData()"> <input type="text" name="isbn" placeholder="ISBN" required /& ...

Explore the Wikipedia API play area by searching based on the user's input

Having trouble searching Wikipedia based on user input. Initially, I suspected a cross-domain issue, but I believe .ajax should resolve that. You can view the codepen here: http://codepen.io/ekilja01/pen/pRerpb Below is my HTML: <script src="https:// ...

invoke a function through a form in Angular

I am encountering an issue with invoking a function from Angular. This particular function has a dual purpose - it uploads an image to S3 and saves the form data along with the URL of the image in the MongoDB database. Below is the HTML snippet where I cal ...

Accessing an object from multiple React components

I am working with a MapboxMap React component that initializes and displays a Mapbox map (stored in the map const variable), and requires rendering of MapMarker components within it. This is the structure of the MapboxMap component: import React from &ap ...

Using JQuery to attach an event listener to Ajax success

What is the purpose of using bind on AJAX success calls? Consider the following code snippet: $.ajax({ url: myurl, dataType: 'json', success: function(data){ this.setState({data: data}); }.bind(this) }); Is there any dif ...

What is the best way to arrange an array of objects in JavaScript by numerical order and then alphabetically?

Possible Duplicate: Sorting objects in an array by a field value in JavaScript I'm looking to sort an array of objects both numerically (by id) and alphabetically (by name). However, the current method I'm using is not giving me the desired ...

Optimal Method for Verifying Internet Connectivity in JavaScript

My application, using an instance of Internet Explorer, is constantly checking the internet connection through Ajax. However, due to low bandwidth, Internet Explorer keeps crashing. What are some best practices that can be implemented to prevent this crash ...

Trouble receiving the response calculation from the express server?

Can you please help me identify what is missing in my code? This is the HTML code I have so far: <!DOCTYPE html> <html lang="en" dir="ltr"> <head> <meta charset="utf-8"> <title>Calculat ...

Include a new key into an array of objects within an asynchronous function

I am struggling with my async/await setup in an API route where I need to merge data from two sources into one object before returning it. The problem arises when I try to push data into a second array within the .then() block, as the array named clone end ...

Issue with ReactJS: onChange event does not function properly when value is changed using jQuery

This is the reactjs code I am working with: <input name="date" id="date" value={this.state.listManage.date} onChange={this.handleForm} type="text" /> When I manually type in the input field, the onChange function works ...