Launching Webstorm, installed via JetBrains Toolbox, gave the following error “Cannot connect to already running IDE instance. Exception: Process 4,124 is still running“
Found a solution on Reddit:
rm ~/.config/JetBrains/WebStorm2023.2/.lock
Snippets useful for personal purposes
Launching Webstorm, installed via JetBrains Toolbox, gave the following error “Cannot connect to already running IDE instance. Exception: Process 4,124 is still running“
Found a solution on Reddit:
rm ~/.config/JetBrains/WebStorm2023.2/.lock
To run Typescript tests with Mocha, the easiest way is to install ts-mocha and configure your package.json as follow:
"scripts": {
"test": "ts-mocha \"src/**/*.spec.ts\""
}
From here, you can run npm test
as expected.
But you cannot run your test from Webstorm directly. It fails with a SyntaxError
due to missing compilation.
Edit the “Run/Debug Configurations” > Templates > Mocha and add --require ts-node/register/transpile-only
in the Mocha options
Now you can run your tests from WebStorm.
You don’t actually need ts-mocha for this solution, only ts-node (which is a dependency of ts-mocha).
Note: this article is valid only for Husky <= 4
Husky 7 has changed the way they interface with Git
Our team is using Commitizen to enforce format of git commit messages (this is later used to auto-generate changelogs and bump version). And we’re using Husky to make sure everyone joining the team has commitizen running as a git hook.
Now, I am using Webstorm and I create my commit directly from my IDE. The commitizen git hook prepare-commit-msg clashes with Webstorm because it is meant to be used in a CLI environment.
The solution I am using is
Of course, Webstorm is configured to “Run git hooks”. So it will keep running the others hooks we have (lint, tests, …). But it will skip the prepare-commit-msg hook.
I installed Webstorm and wanted Prettier.
I simply installed the Prettier extension and added a File Watcher (as stated in the Doc)
But Prettier refused to run with “node not found” something…
I added this line to my .bashrc
file to make sure NVM creates a symlink to the current node version:
export NVM_SYMLINK_CURRENT=true
Then I edited my environment sudo nano /etc/environment
and added this folder at the end of my PATH /home/tanguy/.nvm/current/bin
(the NVM symlink)
Now Webstorm will launch and Node will be in the PATH so Prettier runs fine.
Oh and I had to add some command line arguments to the Prettier File Watcher on Webstorm because the plugin was not reading my eslintrc.js configuration file.
Replace “Webstorm” by whatever editor you use.
You’re done.
This solution comes from: https://youtrack.jetbrains.com/issue/IDEA-141456#comment=27-2343957