npm error ENOTEMPTY on babel-loader while npm install - reactjs

I am trying to install a new dependency and I get this error.
Any hint to fix this please ?
Thanks!
==> EDIT : I tried to delete that folder and run the npm install emailjs again and it pointed out the same error but for another folder. And it goes on and on and on while deleting the specific folder and trying npm again :

Try to delete all content in the /babel-loader directory and do it again!
but make a backup of the directory before deleting..

I could not figure out a solution to this.
I started a new project from scratch and copied all documents.

Related

Simple NPM Question Re-updating local react project after other dev added new package

I just started working with vscode and npm/git. Someone on my team added a package and I did a pull to get his latest changes which put that package in my package.json file. When I ran the project I got errors for a module not being found. Obviously I need to install that package locally. Do I simply use npm install w/no arguments to get it? Or do I install it manually myself with npm install and version info? I ask because I don't know if npm install w/no args will create a new package.json or cause any issues.
What is the correct way to get a new package installed that someone added in the repo?
npm install can be run as many times as you like, and is what you should be doing here :)
npm install's purpose is to get your node_modules folder up-to-date with whatever is written in package.json
So, if your colleague has changed package.json (by installing something new and pushing the change to git), you can just run the command again to get up-to-date.
Provided you haven't directly fiddled with any files in node_modules (this folder should be left alone), it is always safe to run npm install as many times as you like, even if nothing has changed.

npx create-react-app my-app yield result 'create-react-app' is not recognized

I tried to use the 'npx create-react app [project name]' in my project folder but it produced this error
This happened after I deleted the create-react-app.cmd in my C:\Users[myname]\AppData\Roaming\npm folder.
I deleted the file because I had a different problem before where I used the same command but produced "module not found". So someone suggested me to delete the create-react-app.cmd file in my roaming/npm folder. even before doing this, I have tried uninstalling global create-react-app based on the create react app repo.
So was the deletion of create-react-app.cmd the cause to my problem? if so, what should I do to have that file back?
npx came with NPM, so with nodejs.
Uninstall and reinstall nodejs will fix the problem.
Add npm i create-react-app command before that command, and it will fix the problem.

Installing โ€œatom-beautify#0.33.4โ€ failed

when trying to install atom-beautify package, i have the following error.
npm ERR! Unexpected end of JSON input while parsing near '...concat":"latest","#ty'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\HP.atom.apm_logs\2021-02-14T07_09_54_821Z-debug.log
i made sure, the atom version is up to date, windows firewall is off, antivirus is off
pls help me to fix this issue. thanks.
delete the .apm folder inside the .atom folder
Thank you
you might be wondering where the apm folder is
you'll find it in the last options in the settings named open config folder with a link opening sign tap on it wait for another page to load,right there you would see different folders.look for the apm folder and delete it.restart your atom app and try installing the beauty package.hope it works for you

cannot find module '#babel/helper-regex' require stack

I am working on this React project which i did the following steps in the project root folder.
yarn
yarn start
and it compiles and runs the first time successfully. However, after code changes (no new libraries were added), during compilation this error comes up:
./node_modules/react-dev-utils/webpackHotDevClient.js Error: [BABEL]
C:\Users\user\Documents\react_project\node_modules\react-dev-utils\webpackHotDevClient.js:
Cannot find module '#babel/helper-regex'
And i end up having to delete the entire node_modules and re download.. Does anyone have idea why this happens?
Delete the node_modules folder and reinstall them.
This worked for me. I hope it can work for you too. ๐Ÿ˜Š
yarn add #babel/helper-regex
comes to mind at first glance
but did you get any workable solution?
It might be issue with node_modules.
You can resolve this issue by the following steps,
Delete node_modules folder from the project directory.
Delete all lock files like package-lock.json, yarn.lock etc.
Install node_modules using npm install command instead of yarn install.

npm installation error CLI

I tried to install npm and run angular project but there is a warning
I ran this command npm install -g #angular/cli after installing git and node
you are missing package.json from your project. Since you have installed angular/cli globally, you should just create new project as ng new nameofproject
See here for more info https://github.com/angular/angular-cli
You need to have package.json file using which npm downloads dependencies for the project. Create a new project with the following command ng new projectName.
You are here:
C:\xampp\htdocs\angular>npm install
instead use:
C:\xampp\htdocs\angular>ng new myangular-app
When you do this it will create and download all the required files and dependencies. After this you are good to go then.
Hope this helps!
PS: Please have patience, as this can take some time to set up your new project. (It will download all the required files and dependencies to node_modules folder).

Resources