npm build issues stemming from browserlist configurations

I am encountering an issue with my create-react-app failing to build, showing the following error:

./src/index.css
Module build failed: BrowserslistError: Unknown browser query `dead`
    at Array.forEach (<anonymous>)

I have carefully reviewed my package-lock.json file and updated all packages that rely on browserslist. However, some of these packages do not upgrade to version 3 or above, which I suspect may be causing the problem. The packages in question are:

-autoprefixer -babel-preset-env -babel-preset-react-app -postcss-merge-rules

I am contemplating removing these packages, but other dependencies in my project rely on them as well. As a result, I feel a bit stuck and uncertain about what steps to take next. While the application runs without issues, it fails to build properly, making me unsure if it would function correctly on a development server.

Below is a snippet from my package.json file:

   {
  "name": "dashboard",
  "version": "0.1.0",
  "private": true,
  // Rest of the content remains the same

Answer №1

After reviewing your package-lock file and updating the versions, did you remember to execute npm install again?

Another option is to run npm update to see if that helps resolve the issue.

If the problem persists, you can use npm ls to display all packages and their dependencies. Look for the package with a dependency on an old version of BrowserList. Check if you can update that package, otherwise consider reaching out to the package owner for assistance.

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

Connect Angular ngx-datatable accountid to a specific details page

My datatable is displaying static data with account numbers and other details, including a column for actions such as viewing a row. When I click on the button, an alert shows me the specific details. userdetails.component.ts rows: any = [ { id: 0 ...

What is the process for decoding JSON in Codeigniter and where can the main class be found within the framework's directory structure?

I am a beginner with CodeIgniter and I am currently facing some challenges decoding a JSON response. In the past, when I used simple PHP, I would use CURL functions like this: $init = curl_init(); curl_setopt($init, CURLOPT_URL, $url); curl_se ...

Converting data tables to JSON format

Hey, how's it going? I have this dataframe that resembles a nested table and I'm aiming to convert it into a JSON format (kind of like a matryoshka doll). I'm working with Python. Here's an example: Dataframe: id name relations ...

If the value is null, pass it as is; if it is not null, convert it to a date using the

I am currently facing an issue regarding passing a date value into the rrule plugin of a fullCalendar. Here is the snippet of code in question: Endate = null; rrule: { freq: "Daily", interval: 1, dtstart: StartDate.toDate ...

Errors found during compilation when running the npm start command

After choosing to develop an app with React using VS Code, I initiated the process by running npm create-react-app ./, which was a success. However, when I proceeded to execute the command npm start, it resulted in compilation errors related to files suc ...

Should the method of creating a Dropdown with Angular be considered a poor practice?

I've recently dived into Angular and successfully created my first dropdown using it, which is working great. However, I'm a bit concerned about the number of comparisons being made and wondering if this approach is considered bad practice. The ...

Tips on inserting javascript to modify the CSS class of a table data cell in a Flask WTF jinja2 table based on the cell's value

I have integrated Flask WTF to showcase the results of a database query. I am seeking a way to modify the cell background color to light red if the value is below 25. I am unsure about where and how to embed the JavaScript code to validate the cell value a ...

Enhancing React Native experience by dynamically editing array elements

This code block defines the state of my program, including an array: this.state = { arr: [{ arrid: 0, arrEmail: '', arrName: '', arrPhone: '' }], id: 0, email: "", isChecked: true, name: "", phon ...

Issue with Promise rejection not being caught in Node.js with ExpressNode.js and Express are not

Within my Express web application, I've created a function that outputs a Promise object. login: function(un, pass) { result = {}; var loginOk = new Promise( function (resolve, reject) { if (result.hasOwnPr ...

Symfony 3 JSON normalizer - A tool to standardize all timestamps within a JSON structure

When working on my Symfony 3 application, I have implemented a normalizer and serializer to format the result set as JSON. The default rendering of doctrine Datetimes looks like this: "maintenanceStart":{ "timezone":{"name":"Australia\/Melbourne", ...

In React, the functionality of rendering components conditionally is not functioning properly

I am looking to conditionally display either the Login component or Menubar component based on the value of the isLogin state. If the isLogin state is false, I want to render the login page. If it is true, I want to render the Menubar page. To achieve thi ...

code for handling window.location.href error

Continuing from the previous question, I am facing an issue with redirecting a form to an action while using Ajax. Despite my attempts to add a redirect in the Ajax function, I keep encountering errors and getting the wrong URL. The desired redirection is ...

How to include images in a PDF using jspdf without encountering issues with Adobe Reader?

For a project I'm working on, I've integrated jspdf to convert some charts into a PDF. The framework I'm using is angularjs 1.5.6, and the charts are created with chart.js. The HTML snippet for the charts looks like this: <div name="char ...

The final DOM is not loading properly when using Jest and React Testing Library during page initialization

I'm currently working on testing my React application with Jest and React Testing Library. During this process, I am attempting to verify that the login page displays a specific message once it has fully loaded. Upon initial loading of the login page, ...

How can we implement a select-all and deselect-all feature in Vue Element UI for a multi-select with filtering capability?

As a newcomer to VueJs, I am exploring how to create a component that enables multiple selection with a search option and the ability to select all or deselect all options. To achieve this functionality, I am utilizing the vue-element-ui library. You can ...

Encountering an issue: Unable to load resources - Server returned a status code of 500

Struggling with implementing ajax code in my app development. I've encountered an issue where the ajax code that works fine in the video tutorials I'm following doesn't seem to work for me. It's really frustrating! Here is a snippet of ...

Unable to modify variable values in AngularJS

I'm currently utilizing AngularJS along with the "Angular Material" implementation (found here: https://material.angularjs.org/latest/#/) One of the components I'm using is the SideNav component: https://material.angularjs.org/latest/#/demo/mate ...

Obtaining a group object when the property value matches the itemSearch criteria

What is the best way to extract specific objects from a group when one of their properties has an array value, specifically using _.lodash/underscore? { "tileRecords" : [ { "tileName" : "Fama Brown", "tileGroup" : ["Polished", "Matt", ...

Are you asking about Java entities derived from a specialized database system?

I have a unique database system that stores schema files in JSON format, but unfortunately it does not support JDBC connectivity. As a result, I am unable to utilize the "entity class from database" feature in NetBeans. The proprietary database provides me ...

Can a web application be developed utilizing JavaScript to access the torch feature in Safari?

Currently working on a website that needs to utilize the flashlight feature on both android and IOS devices. Found a method to activate the torch from an android device using Chrome (link). However, this same code does not seem to be functional on my IOS d ...