Been running my npm start, which uses yarn, over and over for the last 5 months and has been working since day dot. I even see it in my Terminal history 10 lines above.
> yarn
yarn install v1.10.1
I killed my npm start process a moment ago, and now for some reason, I get this...
> yarn
sh: yarn: command not found
Yarn is no longer installed on my system...for some reason. So I installed it and get the usual information that it's installed.
$ npm -g install yarn
+ yarn#1.12.3
added 1 package in 2.786s
But yarn still isn't installed and I'm still getting the same above issue.
I haven't done anything that would have messed up yarn in anyway (no installing/updating/removing of any packages), so I'm completely stumped as to what the heck happened.
Has anyone had this issue, know what it is and has a fix?
After a bit of playing around, it seems that killing yarn in the process of it doing it's update, killed it's global link (e.g. /usr/bin/yarn) to it's binary.
So I ran the yarn application from it's full path, which I got from the npm install -g yarn (in my case /usr/local/Cellar/node/10.12.0/bin/yarn).
This then updated yarn, reinstalling the links and fixing it, and now it's all working. :)
Related
I've been trying to install freeCodeCamp repo locally coz I'm doing the Full-stack curriculum and I am in a remote area where the grid is not reliable.
I've got the repo on my compute already. I've also installed MongoDB and Nodejs and Npm, following instructions and steps posted on Github by the freeCodeCamp Team. When I get to the step where dependencies need to be installed using "npm ci", the progress bar runs untill halfway, then it stops forever (sometimes it freezes the whole system).
I've tried with Git Bash, Powershell, and Powershell ISE with same results. I did uninstall and re-install Nodejs and NPM a couple of times for no avail. The versions are Node v16.17.0 and Npm 8.18.0.
Any HELP will be appreciated.
I'm having similar issues with v16.17.0 and npm v8.18.0. Downgrading to v8.13.0 seemed to fix it for me but I can't find any previously raised issues as to why this may be the case.
To downgrade:
npm i -g npm#8.13.0 && npm install
Seems to occur from v8.14.0 onwards
Today i decided to start react native cli project. Everything works great since i want to add new lib of course using npm . So i ran npm install ... . And this command always stuck on
Image
idealTree: timing idealTree Completed in 3440ms
And nothing happened. So i tried to ran
npm install --verbose
And again stuck on the same place. Also clear cache npm cache clear --force and nothing happened again. I don'n know how to fix this
I have had npm install freeze on me numerous times, lately. I'm not sure of the cause. When that happens I follow these steps:
Kill the npm install process with ctrl+c.
Delete node_modules. If there are files that you cannot delete because they are currently in use, that may mean that the npm install process was not successfully stopped. Try opening Task Manager and ending all nodejs and terminal processes. If this fails, restart your pc and then delete node_modules
Clean cache and reinstall node_modules with npm cache clean --force && npm i
This has happened to me a few times before and all I had to do was kill my dev server before running npm install.
Hope that helps as well!
I had the same issue on node latest version v18.8.0 and npm v8.18.0, I just downgraded to node 16.6 using nvm and it worked fine.
For me, the issue was that I had node running for a separate project. Terminating the other node process fixed the issue.
When i opened my package.json i saw '~2.2.1' in front of react-native-gesture-handler which probably means that it was notinstalled properly
Just close all terminals and then open task manager and kill all the processes corresponding to NodeJS. Then install it again.
Hopefully it will resolve.
I also faced this problem and the solution was simple by stopping all the "nodejs terminals" that are working outside.
When you stop nodeJS Terminals running in the background, it will complete the current installation process.
enter image description here
When you want to add package on your project it is better to stop server before adding new package.
I had same problem but after doing this it is solved.
Generally when I run npm install sometimes my pc crashes and shows the screen like the image below. I’ve tried removing both the package-lock.json and node_modules. I’ve also run the commands npm rebuild -g and npm cache clean -f.
2 days ago I reinstalled my pc to fabric settings and it still doesn’t help.
I’m using WSL, nodejs v12.10.0 and npm 6.10.3.
Anyone knows what’s up and could help me?
https://imgur.com/a/762AdrR
Update
I've been using yarn instead of npm since 3 months back and this problem has never occured again. So if you are experiencing the same problem as me, try it out.
I followed the tutorial in the link here https://facebook.github.io/react-native/docs/getting-started.html#content . As it turns out, npm 5 is not supported yet. I tried installing npm 4 but, it is not working either. Stuck in the first page of the tutorial, when I run npm start, I am getting a bunch of errors too. Literally stuck, nowhere else to turn. Before voting down the question, kindly note that I am a mobile developer working with andorid and Ios having no previous knowledge about web technologies. Thanks
These are the steps I followed
npm install -g create-react-native-app
It was successfull, then,
create-react-native-app AwesomeProject
for this line, I got the following error
*******************************************************************************
ERROR: npm 5 is not supported yet
*******************************************************************************
It looks like you're using npm 5 which was recently released.
Create React Native App doesn't work with npm 5 yet, unfortunately. We
recommend using npm 4 or yarn until some bugs are resolved.
You can follow the known issues with npm 5 at:
https://github.com/npm/npm/issues/16991
*******************************************************************************
Then I ran the command
cd AwesomeProject
Afterwards I ran
npm start
for which I got the error
npm ERR! missing script: start
npm ERR! A complete log of this run can be found in:
npm ERR! /home/jayakrishnan/.npm/_logs/2017-07-25T08_13_06_277Z-debug.log
I tried using Yarn But didnt work
npm i -g npm#4.6.1 - then install create-react-native-app again and create a project.
Solution with Yarn:
First install Yarn
yarn global add create-react-native-app
cd AwesomeProject
yarn start
npm install -g npm#4 Use this to downgrade, Also use sudo with the commands, sometime it does give permission to write error and skips the installation
Try putting more information about the error so we can help, or steps to reproduce it.
One thing to try is to instead of using npm, use yarn. Install yarn with brew install yarn if you are on mac and do the same steps in the getting-started guide, except for use yarn run ios to start app in ios simulator.
I just tried with a fresh setup that this is working perfectly fine.
Reference to yarn https://yarnpkg.com/en/
I am running Windows 8.1 with node version 7.7.3 and npm version 4.1.2.
I have been working on an Angular tutorial without issues. At some point since finishing that tutorial I installed Python. I am not sure if it is related, but I have mentioned it just in case.
Today I am trying to create an Angular application and it hung without completing.
I did some research and it tells me to do this:
npm uninstall -g #angluar/cli
npm cache clean
npm install -g #angular/cli
The last command hangs at this point:
loadRequestedDeps: silly install loadAllDepsIntoIdealTree
I opened the command prompt "run as administrator" to run these commands.
Everything I try fails. I have connected to a completely different network to eliminate that as the problem and that didn't fix anything. I have uninstalled and reinstalled node.js and that hasn't fixed the problem either.
I can ping registry.npmjs.org just fine.
What is causing this error?
I finally found the answer! I ran the following command in the command window:
echo %temp%
It had 3 temp paths in there. I removed the two I didn't need and voila, it works!