Having issues installing and using npm install -g yo generator-code on macOS Ventura - visual-studio-code

I wanted to update my Visual code studio theme I've created when I went to my terminal to update my theme. I put in the words. Yo code is showed an error that it couldn't be installed or found. I have installed the generator a few weeks ago. When I tried to reinstall it it told me to install it as an administrator, I did that when the process is complete I entered the same word. Yo code did not work so I decided to delete it all together, then reinstall it, but it didn't work. I have node installed and MPM I did the procedures correctly, but the generator does not work at all.
I tried reinstalling the generator, through node and NPM both as an administrator, but it did not work at all. I did a lot of research regarding that is shell, but there is no solution that kind of fix that issue I'm having.

Related

Playwright VSCode gives `No tests found` message

I've installed the Playwright vscode extension but when I go to the testing area I get a "No tests have been found in this workspace" message. But when I run $> playwright test on the CLI it works like a charm. The weird thing is, that some time ago it was perfectly working in VSCode.
When I click the reload icon I get
But then after a couple of seconds I get back where I started.
When I click the blue button I go to the list of extension
I'm not very sure what I am suppose to install here. Also, it did work in the past already.
This is the extension I installed for Playwright:
Any suggestion what is going on here in my VSCode?
I had the same issue, the only thing that helps me is VS code update, this extension works only on the latest version on VS code.
tests section
I had the Microsoft extension installed and latest VSCode and got the same message in the Testing panel after using the "Install Playwright" command.
For me it was restarting VSCode completely that made the extension work. Note this was a full app restart and not just the "Developer: Reload Window" command.
Update Node on your system to the latest and it will resolve it. I had the same issue and by updating node, Vs Code immidiately detected all the test files and it works like a charm.
Check that you're using a supported version of playwright.
In the "details" section, the extention I have installed says
This extension works with Playwright Test version v1.19+ or newer.
I was using Playwright version 1.17, and faced this same issue. Updating to use version 1.19 fixed it.
I had the same issue with Playwright version 1.26.0
I actually had a github issue open
https://github.com/microsoft/playwright/issues/17687
Updating to Playwright version 1.26.1 solved the problem and tests were found once again.
I've had the same issue with a vs code which has been installed on a ubuntu box using the "ubuntu software" installer. This only installs snaps, which probably caused the issue. First I uninstalled the snap and deleted the .vscode folder in the users home directory.
After using apt for installation ( as explained here https://linuxize.com/post/how-to-install-visual-studio-code-on-ubuntu-20-04/ ), the playwright plugin worked without any issues.
Please update your Playwright version (Version 1.28.1 at the time of this post) to the latest, (Steps below),
First Check your current version
npx #playwright/test --version
Update to the latest version
npm install #playwright/test#latest
Install Browsers
npx playwright install
Check the updated version
npx #playwright/test --version
And also install/update the latest version of the Playwright Test for VSCode (v1.0.1 at the time of this post) and reload the IDE.
This can be done by simply as follows,
Go to Extensions
Search for "Playwright Test for VSCode"
Update or install the given latest version
It Worked for me.
I had the same issue when trying to use existing tests and the latest available version of VSCode and NodeJS just installed on my PC. It that the issue is in the lock files (yarn.lock and parameters-lock.json) contained conflicting requirements, I left only those files that already were with the tests and everything immediately worked after clicking the "update tests" button.

How to uninstall VS code completely from manjaro linux, when terminal doesn't see it at all?

I am very new here, and also in programming.
I have found out that I have VS Code two times installed with different ways. When I started it from the KDE it ran well, but when I have started it from the current directory with "code ." it was an oss version without some extension and accounts.
Now I want to uninstall completely both of them. One version I could from terminal with yay --remove code. So the terminal can't see any versoion of vs code any more. But in the application launcher is vs code still there, I can run it and use completely. But I have no idea how to uninstall it.
I have already tried this: https://code.visualstudio.com/docs/setup/uninstall
you can uninstall from manjaro linux by visiting the add software>installed>code and clicking the trashcan near the name of the software. this will queue the action of deletion. Now just click apply on the bottom right of the screen and confirm all the things it will ask you. then it will uninstall code.
So I also had this problem, I found this command for uninstall vs code,
sudo pacman -R visual-studio-code-bin

Vs code blank terminal problem, can't enter anything

I'm user using Visual Studio code.
A few days ago, I've gone through some problems.
It's about "blank terminal". I'm not sure what trigger this problem.
I guess it's related with vs code updated 1.39 version. I attached the picture below.
enter image description here
I've tried searching solution in order to solve this problem. but I failed.
1. remove the 1.39 version. and re install vscode. (remove vscode file)
- sudo apt remove vscode, sudo apt autoremove
- I searched .vscode and then remove all( some setting file left.)
2. I tried to install vscode by snap, but result was same.
3. I started with root
- sudo code --user-data-dir => teminal is possible to see but environments not working => fail
4. I tried down grade.
- version 38,37 => failed (it's same result)
- version 32 => success (but it's old version, limited several utilities)
**Ubuntu 18.04.3 LTS , 64 bit
Anyone having same problems and working out, Please tell some methods.
I look forward to getting reply. Thanks.
Setting "terminal.integrated.inheritEnv" to true in settings.json solved this problem for me.
I think it is related to this bug
You need to select a default shell. Where it says 1:, click the down arrow and select your shell.
I was running into this issue with vscode that was installed through the ubuntu software center
I uninstalled it and deleted any settings using this https://superuser.com/questions/1113022/how-do-i-remove-vs-code-settings-from-ubuntu
I then installed through anaconda since I was already using it. This install worked fine.

Visual Studio Code extension marked malicious, how to (force) install?

When I started VS Code today the 'Apollo GraphQL' extension was marked as malicious and removed from my extensions. I would really like to reinstall it, but VS Code wont let me.
I get the following message when trying to install it from the cli:
λ code --force --install-extension apollographql.vscode-apollo
Found 'apollographql.vscode-apollo' in the marketplace.
Installing...
malicious
I also tried adding the --force argument when installing it through the cli.
Is there any way I can still use this extension?
You cannot install it until they fix it.
Try and find a similar extension. There are loads of extensions for GraphQL.

VSCode - TypeScript language service died unexpectedly 5 times in the last 5 minutes

This error message keeps sliding down from the top every few seconds. I click on the close button and it comes back again. I am not and don't plan on using TypeScript in any of my projects.
Is there a way to "silent" this warning message?
Is there a way to change the frequency that the warnings slide down on the screen?
This is happening in VSCode 1.8.1 and 1.9 on Windows 10 and Windows 8.
I work on TypeScript for VSCode.
The TypeScript language service powers language features for both TypeScript and JavaScript code. Without it, you do not get any suggestions or intellisense or any other nice language support.
Please open an issue against VSCode if you are seeing this error. You can also try upgrading the version of TypeScript that VS Code uses to pick up the latest fixes and features: https://code.visualstudio.com/Docs/languages/typescript#_using-newer-typescript-versions
(I'm also looking into a better way to handle this message since it can be very spammy when the TypeScript service crashes continually)
I resolve my problem by use this way:
first, open your typescript.tsserver.log to "verbose"
restart vscode, and open ts log
and you will find when make your tsserver so slow, as for me, jest_cache is the problem. so I add a exclude in my tsconfig.json
restart, and the problem solve.
I the same problem with VSCode using a workspace Yarn and Typescript. After a couple months without a solution, I tried updating the Yarn VSCode SDK using yarn dlx #yarnpkg/sdks vscode as part of these instructions and that fixed my problem.
you can try to install this vscode extension to make vscode use latest typescript version
To people getting here using WSL2 & Ubuntu(?)
rm -rf ./vscode-server worked for me
Disabling the "JavaScript and TypeScript Nightly" extension worked for me.
The error always said that the workspace was using an old verison of typescript and that I should upgrade although I was up to date. It looks the workspace was using the latest dev build of typescript because of the extension or something like that maybe caused the error.
For a temprary solution you need to rollback to an older version. In my case it worked with: https://code.visualstudio.com/updates/v1_39.
upgrading to TypeScript v3.7.3 and using VSCode Insider's Edition seems to fix the issue for me.
There are multiple ways to upgrade. One way is:
yarn add -D typescript#3.7.3
https://github.com/microsoft/vscode/issues/84618#issuecomment-562290275
Here is my solution which I spent 1 week.
Fallback version to Version: 1.61.2 (Universal)
Rmove your local VsCode totaly.
quit it
remove it from your Application folder
remove the file ~/.vscode
rm -rf ~/.vscode
Install the vsCode v1.61.2 and open it;
Close the aoto update. it's important
find the menu Code > preferences > settings
search keyword of update
set Application/Update/update > mode > none
Open your ts project
Hope help you
took me a few confusing days, as it kept trying to default to 16.8 which I had not installed via nvm
I installed and un-installed 16.8, set the default and system aliases (always alias to a version number without any letters ['v']
Finally I found a posting that said, no matter what you have installed for nvm MacOS will always use the system Node if there is one.
So: brew uninstall node got rid of a version that I didn't was on my mac... I've been using nvm for many years, so I don't know how it got there. Perhaps it came in as a dependency...
Since I use nvm, and always want the typescript support I pinned it to a particular version of node that I know has typescript installed globally
tsdk: /Users/ajoslin/.nvm/versions/node/v16.14.0/lib/node_modules/typescript/lib/
In my case, I didn't have the typescript compiler (tsc) installed on my system. So npm install -g typescript resolve my problem.