I have a bug with Yarn and terminal (on Windows 10). When I use yarn add, yarn start etc then the first several lines are invisible and empty space appears.
For example, I have test.js with console.log('Hi console').
When I use yarn start (screen 1).
When I use npm start.js - it's ok. And then If I use yarn start - it's ok too. (screen 2).
But using 'yarn' standalone - making this bug.
Also I tried reset. Did not help.
So, it is March 2020 and I encountered this problem with Yarn 1.22.1, running VS Code Insiders on Windows 10. The OP's screenshots above show the problem, with the version of Yarn printed, followed by rows of empty space before returning to the prompt after apparently ignoring the command.
According to vscode issue #72145, "This is a bug in Windows 10 1809, unfortunately we have no way to work around the issue so you will need to wait until you get the next version of Windows 10 (1903)" ("Tyriar", April 11, 2019).
The fix the terminal in VS Code for me was to upgrade to Yarn v.2, which was just released in January 2020.
Yarn 2 has a lot of differences to Yarn 1, however, so you would want to read the Yarn 2 Migration docs before deciding if upgrading is the best course of action for your project. The chunk of empty space still appeared after upgrading, but was followed by the correct output in response to the Yarn commands.
Before upgrading to Yarn 2, if you don't want to do that yet, the workaround was to open the Windows 10 Command Prompt, cd into the project directory, and run the Yarn commands from that CLI. Using the Windows CLI correctly showed the correct output to Yarn commands where Git Bash did not.
Hope this might help someone.
Related
I've been using Cypress locally on my MacBook for some time and it's been going great. Lately my device has been having trouble, so I set up WSL on my PC so I could have a backup in case the worst were to happen.
We use yarn to handle dependencies, and I used NPM to install Cypress and Yarn.
Originally everything I was installing was going into a mounted virtual drive, where nothing was working. I eventually got it running off the linux directory, and Yarn and the dependencies installed fine. I also was able to install Cypress#9.5.4, which is the current version I'm using.
Every time I try to run Cypress headed or headless, I'm being met with the following:
No version of Cypress is installed in: /home/workterminal/.cache/Cypress/9.5.4/Cypress
Please reinstall Cypress by running: cypress install
----------
Cypress executable not found at: /home/workterminal/.cache/Cypress/9.5.4/Cypress/Cypress
----------
A couple coworkers took a stab at it, and this is as far as we could get before I decided to reach out for help here. We got me off the mounted virtual drive, we got NPM and Yarn installed properly after using the linux directory, and then reinstalled Cypress using yarn add cypress#9.5.4, which completed successfully.
We've tried expanding $PATH to include everywhere where Cypress exists, but it always looks in .cache. What can I do to toubleshoot further?
I'm developing a lib for common use in a couple react-native projets and for that I'm using a scaffolding lib recommended on react-native official docs page. This is what the company uses, so I have to use it too.
For some reason, running yarn from the command line on my windows machine does absolutely nothing, not even outputs an error message. The company had to lend me a Mac so I can work on the lib. I'm not saying just yarn commands like trying to install packages, even running yarn --version gives me no output, it just halts.
That's the strange part, it only happens if I'm running yarn from inside the project's folder. If I run yarn on my windows machine from some arbitrary folder or any project that does not uses react-native-builder-bob, yarn works normally. I can install packages, check the version, run commands, everything ok. That makes me think it's not something wrong with my yarn installation. Both the mac and my windows have installed version 1.22.10.
I dug through the issues on bob's github but could find nothing regarding windows and yarn. I also have a spare SSD which I tried running a fresh windows install, setting up my work environment again and still got the same issue.
I really want to use my windows machine to work on this project since it's way more powerful than the mac they lend me. Any help would be much appreciated
I had the same problem. Fixed it by changing options object scripts/bootstrap.js
const options = {
cwd: process.cwd(),
env: process.env,
stdio: 'inherit',
encoding: 'utf-8',
shell: true //add this property
};
I'm assuming you have already installed yarn and node.
I am been fighting with TigerVNC since around Fedora 17. Every time I started it manually I would get a black screen that would eventually display the gnome desktop and if I started with systemctl it would not work at all.
Recently wiped my system and installed Fedora 30. Same black screen when I manually start vncserver, but now it never displays the gnome desktop.
These are all default installs. I get no errors to accompany the black screens. I am at a loss of what to do. Could someone provide a working xstartup, config, and command line vncserver command so that I can hopefully get this working?
I had the same issue today after a fresh Fedora 30 install.
But, my home directory is from an older install so I'm using my old ~/.vnc directory and ~/.Xclients file.
I got it working by doing the following two things:
sudo echo "DESKTOP=GNOME" > /etc/sysconfig/desktop
Start vncserver manually as yourself. If you are already running a desktop on your system then you will have to use a different display number, so the command would be something like "vncserver :2".
I use Heroku CLI on Windows 10. The first day after installing it works just fine, but on the next day (or so) it just hangs after launch:
C:\Users\{User}>heroku
and that's all. No output to console, no logs (no error.log). It lasts forever (not 120 sec like here: Heroku CLI Unresponsive)
I reinstalled CLI on 10.10.2017. Today is 14.10, my folder contains the following files:
folder view before cleaning
The autoupdate.log contains:
[2017-10-10T13:36:14+03:00] starting `C:\Program Files (x86)\Heroku\bin\\heroku.cmd update --autoupdate` from
heroku-cli: Updating CLI... already on latest version: 6.14.34-1fcf80e
heroku-cli: Updating plugins... done
[2017-10-11T22:36:40+03:00] starting `C:\Program Files (x86)\Heroku\bin\\heroku.cmd update --autoupdate` from logs
heroku-cli: Updating CLI... already on latest version: 6.14.34-1fcf80e
heroku-cli: Updating plugins... Waiting for all commands to finish
heroku-cli: Updating plugins... done
[2017-10-14T01:13:34+03:00] starting `C:\Program Files (x86)\Heroku\bin\\heroku.cmd update --autoupdate` from logs
heroku-cli: Updating CLI... already on latest version: 6.14.34-1fcf80e
heroku-cli: Updating plugins... Waiting for all commands to finish
What have I tried:
uninstall and install again - this one works, but I don`t want to do
this every day
running as administrator
waiting all night long
using different commands (heroku --version, heroku update etc)
delete folder ..\AppData\Local\heroku
After deleting the folder and running command 'heroku update' the following files & folders were created, but console still hangs:
folder view after cleaning
The autoupdate.log consists now of 1 line:
[2017-10-14T19:39:02+03:00] starting `C:\Program Files (x86)\Heroku\bin\\heroku.cmd update --autoupdate` from update
I waited for an hour since and now writing this question here. Has anyone faced such an issue? What can be done?
Update
Finally I made it work after a few days by reinstalling CLI several times and deleting the autoupdate files, but cannot say precisely which of my actions had true effect. If you face the same issue you can start with the Malik`s answer.
I encountered the same problem when I run $ heroku login on GitBash for Windows.
I tried the accepted answer above but to no avail. What solved it was just to use Windows Command Prompt instead of GitBash and all problems were solved.
I'm just adding this answer here in case someone has done the same thing like I did.
Using GitCMD instead of GitBash solved the problem for me.
I had the same issue and i followed these steps to fix it.
Go to heroku AppData directory. (windows run %LOCALAPPDATA%\heroku)
You should see 2 files named as autoupdate and a directory named as update.lock.
Delete these 2 files and the directory.
Open a new cmd window.
Try running the heroku cmd again. Now it should work for you.
I use following version
heroku-cli/6.14.36 , (windows-x64) , node-v8.9.0.
Relevant github issue thread
I got the same symptom because I was behind a proxy but did not set the proxy env vars.
export HTTP_PROXY=http://proxy.server.com:portnumber
export HTTPS_PROXY=https://proxy.server.com:portnumber
heroku login
Usin CMD git for heroku login. I had to do the other steps using the bash and all was perfect.
I installed last version of Node.js (12.2 x64 windows)
After I run cmd as administrator and try to call any npm command (except npm -v), cmd window is hanging. After Ctrl+C it returns
Terminate batch job (Y/N)?
I was trying to left cmd for several hours but it didn't give some results.
It is strange because node.exe process is consuming CPU and memory quite hard.
I was trying to reinstall node.js several times without success.
I can't even get some debug information.
I faced such issue on my VM which I was using by connecting via rdp. Same version installed on my laptop works ok. On my VM I had Kaspersky antivirus, but after switching it off I got same result.
Did somebody face such issue? Is there some way to get more information problem?
Could you please recommend me some way to resolve?
I've finally resolved my issue.
According to suggestion from our local read me file
Node.js (with NPM) Note: On windows server machines, instead of node modules been installed at user %APPDATA% path, its better to install at a global path e.g c:\npm. This could be acheived by the npm command: $ npm config set prefix 'c:\npm' This is not required on individual developer's machine.
I've executed npm config set prefix 'c:\npm'.
As result it added prefix="'c:\\npm'" to my .npmrc file
This make node.js really crazy. It takes me about an hour to debug all these js scripts npm.js code.js etc... to find that it calls mkdirp with 'c:\\npm'\etc and it loop process forever.
If anyone will encounter this problem in the future you need to find the npmrc file delete it and delete all configurations for node, delete node as well and install it, this should fix that.
when deleting node some of the configurations aren't deleted so you have to delete it manually.
It happenned for me too : I installed node only for my user on Windows 10, and managed to use npm by calling it using the full path "c:\Program Files\nodejs\npm"
I solved by using "c:\Program Files\nodejs\npm" config set prefix "c:\Program Files\nodejs" (setting the prefix to the full path to npm)
And the result was :
λ cat c:\Users\<my_user_name>\.npmrc
prefix=c:\Program Files\nodejs
Now eveything works fine.
It's if the prefix is not set correctly.
Just want to point out to those commenting -if you can't get access to the command line npm, then you can't run npm config, obviously.
Open up powershell and type notepad $HOME/.npmrc, and edit the line where it says prefix=... and change it to a valid one.
For clarity, when you call:
npm config set prefix 'c:\npm'
you are required to have the ' wrapping the path, but you need to remove them from the .npmrc file so that npm commands will work. So your resulting line in .npmrc file should look like:
prefix="c:\\npm"
Just delete the .nprmc file at User/%UserProfile% and now try the command if it dosents work even reinstall once.