Encountered an issue while attempting npm install, with the error message "Error: Undefined variable standalone_static_library in binding.gyp" and node-sass chokidar error

I've been working on updating a Ruby on Rails and React project from 3 years ago. However, I encountered an issue while trying to npm install.

$ npm install

gyp: Undefined variable standalone_static_library in binding.gyp while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1

$ npm start

sh: node-sass-chokidar: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! [email protected] build-css: `node-sass-chokidar src/styles -o src/styles`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] build-css script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

I attempted to resolve the issue by removing node_modules, updating node version, and npm version.

Answer №1

My experience with this problem occurred when using NodeJS 19 (specifically 19.2.0)

The situation was resolved by reverting back to NodeJS 18, also known as NodeJS LTS

NodeJS LTS stands for Long Term Support; it is "recommended for most users". As of the date I am writing this response (12/9/2022), the current Node Long Term Support (LTS) version is NodeJS 18.12.1

It appears that this particular issue (

Undefined variable standalone_static_library...
) may occur due to:

Node 19.0.0 has been modified to make process.config a read-only property #43627

Even after reverting, you may still see it mentioned as a warning, rather than an error:

npm ERR! (node:7120) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future, the property will be read-only.

And speaking of versions, pay attention to the differences between Python3 and Python2!

npm ERR! gyp verb which failed Error: not found: python2

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

Endpoint for the Azure DevOps Npm Authentication Task

Currently, I am attempting to execute the 'npmAuthenticate' task in my Azure DevOps pipeline. However, I am encountering an issue when the 'customEndpoint' is set as a variable instead of being passed as a parameter with the Service Con ...

A guide to resetting items directly from a dropdown select menu

I need help with clearing or resetting select options directly from the dropdown itself, without relying on an external button or the allowClear feature. Imagine if clicking a trash icon in the select option could reset all values: https://i.stack.imgur. ...

Tips for choosing multiple checkboxes with the input type of "checkbox"

image of my columns and checkboxes <table class="table table-striped grid-table"> <tr> <th>Id</th> <th>Code</th> <th> <input type="checkbox" id="box&q ...

Error in React/Redux: props are undefined when using mapDispatchToProps

I am currently searching for information within a database using a react app. Within the actions.js file, I can see the response.data data when I utilize console.table. However, even after exporting, when attempting to display the information, the variabl ...

Using a customized layout, merge AngularJS into Vaadin

I experimented with integrating an angular JS application into Vaadin by utilizing a custom layout as shown below: VerticalLayout mainLayout = new VerticalLayout(); mainLayout.setMargin(true); mainLayout.setWidth("1380px"); setCompositionRoot( ...

Title: How to Build a Dynamic Logo Carousel with React and CSS without External Dependencies

Currently, I am in the process of integrating a logo carousel into my React web application using CSS. My goal is to create a slider that loops infinitely, with the last logo seamlessly transitioning to the first logo and continuing this cycle indefinitely ...

Tips for installing nested npm packages using postinstall scripts or a single npm command

I'm facing an issue with publishing a package to NPM that includes a demo directory structured like this: . +-- demo | +-- src | | +-- main.js | +-- package.json +-- src | +-- main.js +-- package.json My goal is for users to be able to run ...

Utilizing a Nodemailer template with a JSX/React component: A step-by-step guide

Currently utilizing Next.js with Nodemailer, my goal is to incorporate React / JSX components as templates in Nodemailer. In my current setup for Nodemailer, I have to manually write the HTML template like this: html: ` <div style="h ...

Unveiling Insights from a JSON File: Data Extraction

I have a JSON file named pio2.json that contains the following data: { "controles":[{ "chart":[{ "type":"columns", "title":"Pollitos" }], "datos":[{"key":"Math","value":98}, {"key":"Physics" ...

Total Output Calculation

In my latest coding project, I have crafted a unique algorithm to calculate exam scores with the inclusion of interactive buttons! function incorrectResponse() { var calc = 0; var calc2 = 1; var divElement = document.createElement("div"); divEle ...

Tips on invoking an action and updating the state within the componentDidUpdate() lifecycle method in React and Redux without causing an infinite loop

Within my project, there is a shared navigation bar that includes an input text field: <input placeholder="Search Assets" type="text" id="searchTerm" onChange={this.searchAsset} value={this.state.searchV ...

The tooltip function is not functioning properly on Internet Explorer when the button is disabled

I have been utilizing a similar solution found at http://jsfiddle.net/cSSUA/209/ to add tooltips to disabled buttons. However, I am encountering an issue specifically in Internet Explorer (IE11). The workaround involves wrapping the button within a span: ...

Need assistance using a form within a popover in Angular UI Bootstrap?

I have implemented a button that triggers an Angular UI Bootstrap popover by using a template. If you want to see it in action, you can check out this demo The popover template consists of a form containing a table with various text fields that are bound ...

Tips for seamlessly transitioning <img src="..." /> using jQuery?

Currently, I am working on the following code snippet: $img.hover(function(){$(this).attr('src','1.jpg')},function(){$(this).attr('src','2.jpg')}); However, this is not providing a smooth transition as it takes a c ...

Vue.js has encountered a situation where the maximum call stack size has been exceeded

I have implemented a method called cartTotal that calculates the total price of my products along with any discounts applied, and I am trying to obtain the final value by subtracting the discount from the total. cartTotal() { var total = 0; var di ...

Preventing autocomplete from filling in empty password fields (React.js)

Once the browser autocompletes my login form, I notice that the password input's value is initially empty. However, when I click on the password field, suddenly the value appears. Additionally, there are several inexplicable events being triggered by ...

Click the submit button to display a div element without having to refresh the page

Is it possible to display a spinner for a couple of seconds before the page reloads upon submitting a form? <form class="ready" action="https://link.com" method="post"> <input name="test" type="submit" class="click" value="order"/> </form&g ...

Creating a dynamic 3x3 layout using flexbox: a step-by-step guide

Is it possible to dynamically create a layout in Next.js with 3 columns of 3 rows using flexbox, React Bootstrap, or CSS only? ...

Managing dependencies in NPM and Bower is crucial for smooth development workflows

Being a first-time user of npm and bower, I have successfully installed packages, but I am confused about how dependencies work. For example, when I ran "npm install angularjs" in my application root, it created a folder "node_modules/angularjs/" with some ...

What is the method used by Bootstrap to create a darker page background behind a modal?

I am struggling to understand how Bootstrap darkens the background of a page when a modal is displayed. Even though a class is added to the body tag (modal-open), the effect on the background isn't clear to me. Learn more about Bootstrap modals here ...