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

Track WordPress Post Views on Click using AJAX

Is there a way to track the number of post views on my WordPress site using AJAX when a button is clicked? Currently, the view count only updates when the page is refreshed. I want to be able to trigger this function with an AJAX call. Here is the code I ...

Creating a personalized loading screen in React Native: A step-by-step guide

Looking to create a unique loader for my company that features our logo with a moving line border or rotating icons that relate to our business model. I have the images ready, but I'm unsure of how to build a custom loader in react-native or react... ...

How can I assign a prop to a component within the root layout in Next.js version 13, especially when the root layout is required to be a server-side component at all times?

I need assistance with a project I'm working on. My goal is to create a SongPlayer component in Next.js version 13 that plays music and is positioned at the bottom of the window, similar to Spotify's player. However, my SongPlayer component requi ...

Literal Route Waypoints Guidance Service

I am currently working on an angularjs directive that utilizes the Google Maps Direction Service. In my controller, I have a getFunction that watches for changes in a scope variable. Once the scope variable changes, it triggers the calculateAndDisplayRoute ...

Encountered an issue during npm install resulting in an ERR! with the code EINTEGRITY

npm ERR! code EINTEGRITY npm ERR! sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1odfIXVuTqLRUjw== integrity verification error occurred while using sha512: expected sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkE ...

Issue with TypeScript: Error appears when importing express after running "npm i @types/express -D"

Struggling with adding the following line of code in an index.ts file: import express, { Application } from 'express'; Initially encountered an error with "from 'express'", so I ran npm i @types/express -D which fixed that is ...

The POST methods do not support the NEXT_AUTH session

I am in the process of setting up NextAuth authentication with Google as the provider. Additionally, I am integrating MongoDB as the database for my project. Within the API endpoints, I am utilizing getSession to retrieve the session data. However, I am en ...

Leveraging bootstrap sass (npm) in conjunction with gulp

After cloning the repository from https://github.com/HosseinKarami/fastshell, I found that everything was working perfectly. I decided to switch from compass to gulp in fastshell for a faster experience. However, I am now unsure of how to extend it and in ...

Encountering a Caution Message When Attempting to Install Yeomen

Upgrade to a higher version is recommended at [email protected], but how should I proceed? Please provide guidance on achieving this upgrade. C:\Program Files>npm install -g yo npm WARN deprecated <a href="/cdn-cgi/l/email-protection" clas ...

Is there a way to modify Style Properties in JavaScript by targeting elements with a specific class name using document.getElementsByClassName("Class_Name")?

I am seeking a solution to change the background color of multiple div boxes with the class name "flex-items" using JavaScript. Below is my current code: function changeColor(){ document.getElementsByClassName("flex-items").style.backgroundColor = "bl ...

Switch background color multiple times on click using JavaScript loop

Hello amazing people! I have a container with 52 small boxes and one large box containing a letter. The smaller boxes are arranged around the larger one using CSS grid, and when hovered over, they turn light grey. My Objective When any of the 52 small b ...

The npm start command is throwing an error, but running node index.js is

Recently, I embarked on a journey to learn nodejs and eagerly followed a tutorial to create a basic web application. The tutorial stated that I could run the web app using either 'npm start' or 'node index.js'. Surprisingly, when I use ...

Assign Equipment to Every Screen

Upon receiving this JSON response from an API in React Native, the data is stored as this.props.clothesList in Redux. The goal is to segregate objects with a `big_cloth_type` of 't' into the corresponding screen called TopScreen. Below is a snip ...

Eliminating Angular's @Injectable decorator in npm build process

I have encountered a setback while working on a small helper package for Angular. The issue I am facing is related to an exported class that serves as an Angular service and is decorated with @Injectable(). After running npm run build, the compiled class ...

Generate HTML elements within an AngularJS directive and establish a click event

Can you show me how to create some DOM elements and add a click event to them using an AngularJS directive? My current approach is as follows: var list = document.createElement("div"); list.classList.add('myList'); for(var i = 0; i < n; i++) ...

Using Sinonjs fakeserver to handle numerous ajax requests

I utilize QUnit in combination with sinon. Is there a way to make sinon's fakeserver respond to multiple chained ajax calls triggered from the same method? module('demo', { beforeEach: function(){ this.server = sinon.fakeServer. ...

Activate a tooltip in Vuetify

I'm utilizing vuetify and have implemented a tooltip feature on a button. However, I do not want the tooltip to be displayed on hover or click; instead, I would like it to appear when a specific event is triggered. translate.vue <v-tooltip v-model ...

The distinction between a JSON file that is generated dynamically from a response and one that is

I've been working on configuring a bootstrap typeahead feature and here is the jquery code I am using: $(function () { $.ajax({ type: "GET", url: "http://example.com/search?callback=my_callback", data: { keyword: &apos ...

Could a personalized "exit page" confirmation be created?

I am looking for a solution that will allow me to pause the execution of my code, display a dialog box, and then resume execution only after a specific button is pressed. For example, if a user navigates from one page to another on my website, I want a di ...

Get a calendar that displays only the month and year

I am looking to incorporate two unique PrimeFaces calendars on a single page. The first calendar will display the date, while the second one will only show the month and year. To achieve this, I have implemented the following JavaScript and CSS specifica ...