npm ERR! Object for dependency "fsevents" is empty - javascript

I am getting folowing error while installing anything through npm. Kindly help me with it.
premnath#premnath-Inspiron-5559:~$ sudo npm install -g #angular/cli
[sudo] password for premnath:
npm ERR! Object for dependency "fsevents" is empty.
npm ERR! Something went wrong. Regenerate the package-lock.json with "npm install".
npm ERR! If using a shrinkwrap, regenerate with "npm shrinkwrap".
npm ERR! A complete log of this run can be found in:
npm ERR! /home/premnath/.npm/_logs/2020-10-15T07_45_49_290Z-debug.log
premnath#premnath-Inspiron-5559:~$
node version : v12.19.0
npm version : 6.14.8

ERR! Something went wrong. Regenerate the package-lock.json with "npm
install"
Clear out node_modules folder and package-lock.json and run npm i

Related

Error while installing node module in ReactJs

I just cloned a React application from Git that doesn't have node_modules on it. I try to install with command npm install but unable to do it. Following error occurs when installing the npm.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: fuse-react-app#2.0.0
npm ERR! Found: date-fns#2.0.0-alpha.26
npm ERR! node_modules/date-fns
npm ERR! date-fns#"2.0.0-alpha.26" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer date-fns#"2.0.0-alpha.21" from #date-io/date-fns#1.0.1
npm ERR! node_modules/#date-io/date-fns
npm ERR! #date-io/date-fns#"1.0.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\...\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\...\AppData\Local\npm-cache\_logs\2022-04-24T12_44_19_589Z-debug-0.log
I even tried with npm install --legacy-peer-deps but doesn't work. How can I fix this issue?
TL;DR
A possible solution to this problem is setting the version of date-fns to 2.0.0-alpha.21.
Full Answer
To fix your issue, you can change the version of date-fns.
To do this, follow these steps.
In package.json, edit the version of date-fns with the following:
{
"dependencies": {
"date-fns": "2.0.0-alpha.21"
}
}
Save the package.json file, and run the following command in the same directory as package.json.
$ npm install
Your dependencies should install successfully.
Conclusion
In conclusion, you need to change the version of date-fns to 2.0.0-alpha.21.

npm ERR A complete log of this run can be found in

I was watching a tutorial on sass and I got stuck in this part , im not familiar with npm,nodejs and stuff so idk what i should do !? can u take a look and see why i cant install node-sass?
PS D:\NODE-SASS> npm install node-sass
npm ERR! code ENOSELF
npm ERR! Refusing to install package with name "node-sass" under anpm ERR! also called "node-sass". Did you name your project the same
npm ERR! as the dependency you're installing?
npm ERR!
npm ERR! For more information, see:
npm ERR! <https://docs.npmjs.com/cli/install#limitations-of-npms-install-algorithm>
npm ERR! A complete log of this run can be found in:
npm ERR! C:\bla blabla_25_42_696Z-debug.log
PS D:\NODE-SASS> npm install node-sass
npm ERR! code ENOSELF
npm ERR! Refusing to install package with name "node-sass" under a package
npm ERR! also called "node-sass". Did you name your project the same
npm ERR! as the dependency you're installing?
npm ERR!
npm ERR! For more information, see:
npm ERR! <https://docs.npmjs.com/cli/install#limitations-of-npms-install-algorithm>
npm ERR! A complete log of this run can be found in:
npm ERR! c:/bla bla bla
This text clearly states that you gave the same name to your project in package.json as the name of this package.
also called "node-sass". Did you name your project the same
npm ERR! as the dependency you're installing?
Rename your project in package.json and maybe a folder itself not to confuse it with this package
You should rename your project name in package.json file and try again. install package that you want to install. All of them must be OK

Can not run React App after cloning it from Github

I really need your help. I would be highly appreciated.
I clone this project : https://github.com/iearn-finance/iearn-finance,
and I want to have a front-end website like this: https://yearn.finance/.
But I can not run it locally. I have tried "npm install" and then "npm start", check package.json carefully but it still does not work and gave me this error:
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path D:\iearn-finance-develop\package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'D:\iearn-finance-develop\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
1- are you sure path D:\iearn-finance-develop is correct??
isn't D:\iearn-finance ??
2-did you :
delete package-lock.json and node_modules and then npm install
3-check on your filesystem if the file exists.
try these :
npm cache clean
you should initialize package with :
npm init
then install your packages
Try cleaning the cache with npm cache clean
Then initialize with npm init
After that, install your packages.
It worked for mine.

error when installing nodemon on Ubuntu 18.04

when i install nodemon with
sudo npm i --save-dev nodemon
i get the following error message:
npm ERR! path /home/dominikpatera/Dropbox/Projekty/Fytwa/server/node_modules/npm/node_modules/abbrev
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/home/dominikpatera/Dropbox/Projekty/Fytwa/server/node_modules/npm/node_modules/abbrev' -> '/home/dominikpatera/Dropbox/Projekty/Fytwa/server/node_modules/npm/node_modules/.abbrev.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/dominikpatera/.npm/_logs/2018-07-11T09_45_21_545Z-debug.log
can you help me fix it?
Open Terminal and type:
sudo npm install -g nodemon
then
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
you will get an output similar to:
fs.inotify.max_user_watches=524288
fs.inotify.max_user_watches = 524288
After that your nodemon will perfectly work.
At first make sure that on your terminal, you are working on the correct project. you can check this by typing ls and then hit enter.
Then give the command to install nodemon. From the official website of nodemon, we found that, we have to write npm install -g nodemon
But if you fall in problem here, then write this-
sudo npm install -g nodemon

Angular js wont install on my machine

I have node.js installed on my machine, I have version: v0.12.0 installed. Following instructions when I use sudo npm install I get these errors:
npm ERR! install Couldn't read dependencies
npm ERR! Darwin 14.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.0
npm ERR! npm v2.6.0
npm ERR! path /Users/aston.haigh/package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno -2
npm ERR! package.json ENOENT, open '/Users/aston.haigh/package.json'
npm ERR! package.json This is most likely not a problem with npm itself.
npm ERR! package.json npm can't find a package.json file in your current directory.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/aston.haigh/Projects/astonhaigh.co.uk/npm-debug.log
Ive tried clearing the node cache, updating node and havent had any luck, any ideas?
Seem to fix the issue when i uninstalled node and then reinstall using homebrew. P.s really good tutorial: https://www.youtube.com/watch?v=FqMIyTH9wSg

Categories

Resources