Installing “atom-beautify#0.33.4” failed - atom-beautify

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

Related

npm error ENOTEMPTY on babel-loader while npm install

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.

npm ERR! Response timeout while trying to fetch https://registry.npmjs.org/react-is (over 30000ms)

When I want to create a react app I'm encountering the following error:
npm ERR! Response timeout while trying to fetch https://registry.npmjs.org/react-is (over 30000ms)
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\info\AppData\Roaming\npm-cache\_logs\2020-04-23T02_54_45_865Z-debug.log
Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.
Deleting generated file... package.json
Deleting app2/ from C:\Users\info
Done.
Sounds like you have a slow connection. Try increasing the timeout from 30s to 60s by adding this to your .npmrc file:
timeout=60000
You could also try adding
prefer-offline=true
if you are trying to save bandwidth or have a slow connection
Note: if you don't have an .npmrc file setup yet, you can create one here
for Windows: C:\Users\{username}\.npmrc
for Mac/Linux ~/.npmrc
Or you can create one in the same directory as your project's package.json file.
I had a slow connection and I updated the timeout value to .npmrc using:
npm set timeout=100000
And to check if the value is updated (Mac): vi ~/.npmrc
Users are extremely likely to face this issue if they are on a slow internet connection. To counter this, you need to increase the timeout in the npm's config file. And here's how to do it:
Find the .npmrc file (located in the nodejs installation folder; in my case, it's in F:\Installations\nodejs\node_modules\npm folder. But for you, it might be in C:\program files folder).
Open the .npmrc file and append this line: timeout=240000 (usually it is 60 seconds I suppose, but since my connection was way slower therefore, I had to increase it to 240 seconds or 4 minutes, you can keep it 120000 for 120seconds)
Save the file
Since create-react-app fails midway, it can easily break npm's package.json file thus leading to this sort of issue:
Unexpected end of JSON input while parsing near
Therefore, before running the npx create-react-app, run the following command: npm cache clean --force as it cleans the cache and (i think) repairs the package.json file.
I was facing the same issue. I Solved it like this:
create a new file with no name just an extinction of .npmrc
open this file in any editor and type timeout = 90000
save the file and in you terminal type
npm cache clean --force
npm install create-react-app
npx create-react-app ./
Note: this error occurs because of slow internet speed
This error occurs due to slow internet connection. Try installing when you get a better speed. If better speed doesn't solve your problem try this.
npm cache verify
npm cache clean --force
I enabled IIS and the issue was solved for me:
do to Control Panel -> Programs -> Programs and Features
click on Turn Windows features on and off
make sure the Internet Information Services is checked
click OK and wait for some minutes
I was facing the same issue when create a react-app using npx create-react app . And i fixed my problem by running the following command.
npm cache clean --force
I hope you find this helpful
I fixed the problem by setting timeout in user local .npmrc file to
timeout=600000
90000 is not enough for downloading many packages for projects with lot dependencies in package.json
In case you are still running into this issue below with the error:
Invalid response body while trying to fetch
https://registry.npmjs.org/eslint-config-react-app: Socket timeout
Run this script: npm install react --registry=https://registry.npmjs.org
and then npx create-react-app mypp
for your react app installation. Happy coding
I fixed the problem by running:
npm config set registry "http://registry.npmjs.org" --global
It appears the problem is related to the following post:
npm install gets stuck at fetchMetadata
And #CptUnlucky's solution worked for me on macOS Catalina 10.15.7, node v16.0.0, npm v7.12.2, nvm v0.38.0
I was facing the same issue and I solved it by enabling the Internet Information service (IIS) feature of the window.
Enabling the IIS
Steps:
Windown + r
Type appwiz.cpl and click OK
click on Turn window features on or off (on the Left top side)
wait some seconds and check the Internet information service option
Now wait until window apply changes.
create project again.
I have faced the same issue. I tried all solutions over StackOverflow or Github discussions but nothing worked.
I changed the .npmrc file under the Users folder in C in Windows and changed the timeout from 30000 to 90000. See if 60000 works!
In my case it was the issue related to npm verison 6.14*
Downgrading to npm verison 6.13.7 solved for me
npm i -g npm#6.13.7
It's also an newly opened issue
you can check more details about it at
https://github.com/npm/cli/issues/1185
You just need to run npm i npm#6.13.7 or npm I -g npm#6.13.7 if you wanna this to be global version.
After that, just to make sure, run " npm -version " to see what version you are using.
Downgrading to npm version 6.13.7 worked for me.
Try this:
npm cache clean --force
npm config rm proxy
npm config rm https-proxy
And remove your node_modules within your user.
In Windows, it is
C:\Users\${select_your_user}\AppData\Roaming\npm\node_modules
I was facing the same issue when running npm install on Docker.
I had to pass the HTTP and HTTPS proxy values to the image while building it.
docker build --build-arg HTTP_PROXY=http://<your_company_proxy> --build-arg HTTPS_PROXY=http://<your_company_proxy>
It worked fine after I passed these parameters.
In my case it was the issue related to npm verison 6.14*
Downgrading to npm verison 6.13.7 solved for me
npm i -g npm#6.13.7
It's also an newly opened issue you can check more details about it at https://github.com/npm/cli/issues/1185
it is works for me
Editing the .npmrc file to 80000 works. If not, globally uninstall create-react-app:
"npm uninstall -g create-react-app" then run "npx create-react-app ./"
I recently have the same issue and following steps would help you.
npm config set registry "http://registry.npmjs.org" --global (sets registry) (Try Again)
Go to you user folder find .npmrc file there and remove content of it.
run npm cache clean --force
still errors - Remove the content of npm base folder usually inside User/AppData/roaming/npm/...
I tried everything including factory resetting my Mac. Then after reinstalling everything and still having the same issue, I typed into the terminal and ran:
npm set timeout=100000
then sat my computer next to my router and ran npx create-react-app again and it worked!
Sometimes it won't work if you use only letters in your app name e.g first I have used "myapp" and that was not working though I have done all the other stuffs correctly like set timeout = 240000 in .npmrc file and run the following commands
npm cache clean --force
npm install create-react-app
npx create-react-app myapp
but that not working for me then I have just changed my project name from myapp -> my-app and it worked perfectly. So, If you are facing the same issue try them out. Hopefully, it saves your time.
I tried many things for 3 days, then i figure out that new versions of nodejs doesn't work so fine for some computers, i downgrade to 16.0.0 and then worked
Regarding npx ...
If you have create-react-app (CRA) globally installed;
it is recommend you uninstall CRA
to ensure that npx always uses the latest version.
When using npx, the global installation isn't used.
But it may interfere (addressed below).
Don't run your React app from your desktop.
Some operating systems may throw an error.
Windows OS users ...
As administrator (for steps #1 & #2), inside your command-line ...
1) uninstall your global version of CRA.
npm uninstall -g create-react-app Mac prefix: sudo
2) Then ...
Run: npx create-react-app my-app Mac prefix: sudo
Above: This will create the latest version of
a React app named: my-app.
This app will be created wherever your command-line is pointing.
3) Open Google Chrome.
4) cd my-app (point your command-line to your project folder).
5) inside your command-line ... Run: npm start

Failed at the grpc#1.20.0 install script. while installing react

I am having a hard time installing React Theme. The problem is when I downloaded the theme and extracted it and went to the root directory...then tried to install it by running this command npm install.
it gave this error
Failed at the grpc#1.20.0 install script.
the error log was like this:
After whole hours I find a hint from Github saying the problem was installing firebase which basically has grpc in them.
So what I did was to disable the antivirus or windows defender, whatever you have in your pc, and boom it will install safely.
this was the link I referred to https://github.com/grpc/grpc-node/issues/121

npm install connect issue

I am new to node.js. I have been undergoing Angular.js Pro by Adam Freeman
As per the installation step:
I need to setup the web server for angular.js application using nodejs.
Accordingly i installed node.js version 6.11.0 in the path:
C:\Program Files\nodejs
Next step is to install connect module of nodejs using the command npm install connect.
I am getting the below error message when doing so.
shell output here
Can please anybody help with this.
You don't have to do that in the node.js path.
You can head over to a new directory say ~/desktop/temp
And then first do npm init, which would set the project to use npm. It would ask a couple of questions.
Post this, do npm install connect
Well, you need to start clean in an empty folder of your choice. This will be your project folder.
cd into it, then run npm init
Now you're ready to npm install whatever packages you need.

Angular - Error: spawn cmd ENOENT

Hi I have problem when I generate angular - yo angular.
I'm all done. Running bower install & npm install for you to install the required dependencies. If this fails, try running the command yourself.
invoke angular:route
invoke angular:controller:C:\Users\david\AppData\Roaming\npm\node_modules\generator-angular\route\index.js
create app\scripts\controllers\about.js
events.js:85
throw er; // Unhandled 'error' event
^
Error: spawn cmd ENOENT
at exports._errnoException (util.js:746:11)
at Process.ChildProcess._handle.onexit (child_process.js:1053:32)
at child_process.js:1144:20
at process._tickCallback (node.js:355:11)
Anyone show me how to solve this issue? Thanks.
Im not sure why this error comes about, however i managed to run my Angular application by running with : ng serve instead of ng serve --open . Please not you will need to copy the url manually and place it in the browser afterwards which should be http://localhost:4200/
I got the same issue for windows 8 and tried several installations after doing changes to AppData/Roaming folder. None of the solutions worked for me. The issue is because of an environment variable of your system path is missing . Add "C:\Windows\System32\" value to your system PATH variable.
this error occurs when your terminal is not having access to open browers or admin permision try running your terminal as admin
I've got this issue after updating Angular CLI to 11.0.2 and I've been spent a lot of time to resolve this,
Apparently, I've tried the default port to serve my project and it served without any errors. which is http://localhost:4200/ but, I needed to run on http://localhost:8000/ So I did this....
First of all try remove node_modules from your directory and re-install npm packages. (I'm saying this because, some users got resolved the issue) to re-install npm packages, run
npm i
or run below command
npm install
if this didn't work, try adding the port number to the angular.json file.
search for serve options in the json file.
then add your desired port number like this "port": 8000,
(P.S. 'WorkspaceUI' means my project name and I've been trying to run on '8000' port. you can run on your own port number.) Then run your project using ng serve command. Thank you!
There are many guesses on different portal for this error and none of them works. Here is the solution -
Run this command to install angular cli before performing anything -
npm install -g #angular/cli

Resources