Struggling with this npm i problem?

I have tried multiple solutions, but I keep encountering an issue with npm install. I even deleted the package-lock file and attempted using the --force or --legacy-peer-deps option without success.

npm WARN deprecated <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="44272b3621692e3704766a726a7576">[email protected]</a>: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path C:\Users\HillsonGhimire\Desktop\RC\F\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:\Program Files\nodejs\node.exe C:\Users\HillsonGhimire\Desktop\RC\F\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli

npm version: 8.3.1

node version: 16.14.0

Answer №1

If you're encountering issues, consider following these steps to install node-sass based on your current node version

rm -rf node_modules package-lock.json 
npm install --saveDev <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="254b4a4140085644565665130b150b14">[email protected]</a>
npm install

Edit

To adapt to deprecation, switching from using node-sass to sass could be the solution

Answer №2

To fix the issue, attempt to clear the cache by running the following command:

npm clean-install

This solution should resolve the problem.

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

Encountering issues with npm installation due to the errno -2 error

I encountered errors while attempting to install npm, as indicated below: npm ERR! install Couldn't read dependencies npm ERR! Darwin 14.5.0 npm ERR! argv "/Users/bunniehsieh/.nvm/versions/node/v4.1.0/bin/node" "/Users/bunniehsieh/.nvm/ ...

Encountering the error message 'XMLHttpRequest is not defined' while incorporating getServerSideProps() in NextJS

I'm currently exploring NextJS with SSR and encountering an error when trying to fetch data from a Spotify playlist using the spotify-web-api-js library. This issue only occurs when executing on the server side: error - ReferenceError: XMLHttpRequest ...

Leverage Sinon's fakeServer in combination with promises and mocha for efficient

Having an issue here: I need to test a method that involves uploading data to an AWS S3 bucket. However, I don't want the hassle of actually uploading data each time I run my tests or dealing with credentials in the environment settings. That's w ...

When executing the command "npm," a message pops up that says "Error: Module 'inherits' not found."

module.js:340 throw err; ^ Error: Module 'inherits' not found at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380: ...

Tips for confirming that the param data is not undefined within Express

In my project using Nodejs and Express, I encounter an issue when updating data with the following code: exports.update = (req, res) => { const updatedUser = { username: req.body.username, age: req.body.age, dateOfBirth: req.body.dateOf ...

Cross-Origin Resource Sharing (CORS) Issue: Difficulty Uploading Image from Cloudflare-Based Client Website to Heroku Hosting Server

After grappling with this particular issue for a solid month, I find myself utterly bewildered. Despite scouring through countless YouTube videos and tutorials in an attempt to resolve it, the problem persists. The crux of the matter is my struggle to upl ...

The Mantine date picker is causing an error stating that objects are not valid as a React child

I'm currently experimenting with utilizing Mantine Date in NextJS. The goal is to have the selected date displayed in the HTML text heading when a user clicks on it. For instance, if a user selects January 1st, 2023, the text should show like this: Da ...

Encountered an issue during the installation of webpack using npm

Today, I decided to dive into the world of React and came across a helpful tutorial for setting up my environment: Everything was going smoothly until I hit a roadblock while trying to install webpack. npm just kept throwing errors at me and I have no ide ...

Exploring object properties within arrays and nested objects using ReactJS

Within the react component PokemonInfo, I am looking to extract the stats.base_stat value from the JSON obtained from https://pokeapi.co/api/v2/pokemon/1/. The issue lies in the fact that base_stat is nested inside an array called stats. My assumption is t ...

The useContext function is not giving the expected value, even though all the conditions appear to be

After reading through several discussions about the "useContext returns undefined" issue, I still haven't found a solution to my problem. I'm currently working on a weather application using nextJS, the geolocation browser API, and the openweathe ...

Discovering the art of extracting Embeddable Links from Markdown and displaying them using personalized React Components

I am looking for a way to convert Twitter tags from Markdown to Html. Currently, I am utilizing react-markdown for rendering as shown below import gfm from 'remark-gfm' const content = `#Hello <br/><hr/> <p>Please check out th ...

What are some strategies for dividing a webpage evenly between an image and a text-containing div?

I am currently working on emulating a layout that I came across on another website ( if you scroll down past the video and profiles). The layout involves splitting the page 50/50 with a picture that is responsive and maintains its size when the page is res ...

Issue encountered with connection string for CosmosDB emulator using MongoDB: Invalid character detected in host identifier

I've been attempting to link my NodeJs application with the CosmosDb emulator on localhost: https://i.stack.imgur.com/VkAiC.png Within my azure resource group, I have set up a cosmodb instance of type MongoDB https://i.stack.imgur.com/v8KRx.png To ...

Website created using React without the use of Javascript

Currently, I am considering migrating one of my websites that is built using Python-Flask and Jinja2. The reason behind this decision is primarily due to the limitations of Jinja2's developer experience and the fact that Python is not typed by default ...

Using Node.js to convert a file name to a timestamp

I need to change a filename into a timestamp in my Laravel application. let test = "/2020-05-16_11-17-47_UTC_1.jpg" I attempted using split and join to replace the -, but I don't believe it's the most efficient method. The desired output should ...

Is there a way to transform time into a percentage with the help of the moment

I am looking to convert a specific time range into a percentage, but I'm unsure if moment.js is capable of handling this task. For example: let start = 08:00:00 // until let end = 09:00:00 In theory, this equates to 100%, however, my frontend data ...

Guide on accessing data from Infrared sensors sent to a local host via an Arduino with the help of jQuery

Currently, I have a setup where Infrared sensors are connected to an Arduino board. These sensors transmit the value of 1 when no object is detected and 0 when an object is present. To monitor these sensor readings, I have successfully created an HTTP web ...

What is the process for starting my nodejs application using nodemon?

Issue I apologize for this beginner question, but I've been struggling with it for a while now. I'm working on a project to build a Backend API that reads data from a CSV file and saves it in a database as part of a student portal assignment. T ...

Move the location of the npm-debug.log file

Whenever I initiate npm start and encounter an error, the following message is displayed: npm ERR! Additional logging details can be found in: npm ERR! /home/hsz/Projects/project/npm-debug.log npm ERR! not ok code 0 This file is located within the di ...

Anticipating the execution of pool.query within a callback function in the Express framework

Within an Express post endpoint, I am utilizing crypto.generateKeyPair. After generating the key pair, I wish to store it in my database and then return the ID of the inserted row within the same endpoint. Here is the code snippet for the endpoint: app.p ...