I am creating a diagnosticCollection on a vscode extension following this
sample:
It works but if I run the same command twice on the same file it creates a "duplicate" diagnostics issues list in the problems terminal window.
What is the best way to clear that terminal window problems? I have tried to run collections.clear() which I thought would do the job but it did not work.
Related
I'm relatively new to using IDEs and recently started using VSCode for class. I'm using the Code Runner extension and working on a Mac. Whenever I go to run a piece of code I receive the following message in my terminal:
The default interactive shell is now zsh.
To update your account to use zsh, please run chsh -s /bin/zsh.
For more details, please visit https://support.apple.com/kb/HT208050.
Could someone help explain what exactly this message means? I think for class we want to use the Bash shell so I'm hesitant to make any changes to the current settings but I don't want it to interfere with my ability to run/test code.
I am very new to coding and following a tutorial at the moment (building a simple CRUD app). The issue is that once I run the command "nodemon app", I can no longer use any other commands. I can type it out but hitting enter does nothing. How do I use other commands without opening a new terminal?
click here for image
Ctrl+C will interrupt the running process in a terminal, in this case, killing nodemon.
That would allow you to run other commands, but will lose you your nodemon process.
Another option (that might be more suitable for VSCode) is to open a second terminal (Ctrl+Shift+`, or Ctrl+Shift+5 to open side-by-side). In the second terminal, you can then execute whatever other commands you want.
Alternatively, you can append the & character to a command to have it run in the background. This would allow you to run something like nodemon app & and then run other commands, but be aware that in this arrangement, the output of the commands will become interleaved - so if the node application is writing to the console and the other command also outputs information, they might become tricky to read.
I am trying to make a create project with create-react-app but it hangs. I have tried to clear the cache but still, it hangs.
One strange thing is there that there is a .staging file inside node_modules and inside that .staging there are all the dependencies
I have also attached the screenshot of the terminal execution
Use PowerShell instead of MINGW. PowerShell runs natively on Windows and solves many performance and stability issues.
Description
I am following along with the instructions here: https://www.gatsbyjs.org/tutorial/part-one/
When I start the dev server and make a change to src/pages/index.js it is not hot reloaded in my browser.
Steps to Reproduce
Using gatsby-cli:
gatsby new hello-world https://github.com/gatsbyjs/gatsby-starter-hello-world
cd hello-world
gatsby develop
change the text inside of the div in src/pages/index.js
Expected Result
Page would automatically reload with new text.
Actual Result
Page would not change unless a manual refresh was applied in the browser.
Specs
OS: Ubuntu 18.04.3 LTS running in WSL on Windows 10 Pro
Node: 12.12.0
NPM: 6.11.3
Gatsby CLI: 2.8.8
Gatsby: 2.17.6
Browsers: Chrome 77.0.3865.120, IE 11.1006.17134.0, Firefox 70.0
I've tried multiple browsers with the same result so I ran devtools in firefox and examined the console output when I make a change and I see this error:
The connection to http://localhost:8000/__webpack_hmr was interrupted while the page was loading. client.js:88
[HMR] Update check failed: hotDownloadManifest/</request.onreadystatechange#http://localhost:8000/commons.js:42:16
process-update.js:147
Error: Manifest request to /d528b21bff3fd2caa92d.hot-update.json timed out. bootstrap:41
Firefox can’t establish a connection to the server at http://localhost:8000/__webpack_hmr. client.js:88
I've also looked around on github and here and haven't found a solution to my problem. Any ideas on a workaround, solution, or insight into why this might not be working for me would be greatly appreciated!
I was having same problems. Gatsby Develop hot reload was not working whenever I made changes to files, plus, Gatsby Develop was terribly slow to compile code and get the dev server up and running. I found out that if I create my Gatsby project in Linux directory structure instead of Windows, everything works out good and is blazing fast. So my solution was following.
Create your project in /home/<your_username> directory in WSL. Simply go to /home/<your_username> and make a folder there with mkdir; go to that folder and then run Gatsby create my_project command in that folder.
That way your project will reside in Linux directory structure, making everything run smoothly.
I faced the similar scenario today. Below steps made it work however warning message is persistent in the console.
Delete package.lock.json and node_modules folder
Delete the content present inside C:\Users\\AppData\Roaming\npm and npm-cache
Do a npm i.
Im running gatsby develop on windows. After trying many things, including wsl, npm clenaup etc, I realized that my antivirus sophos was blocking the webpack hot reload socket __webpack_hmr.
All I had to do is to disable the antivirus for a while. ( You are free to uninstall it or maybe change to another one ).
hope it works for you ;)
I've been playing around with Terminal IDE (I've recently discovered it) and I wish to run a javascript code I've written but when I issue to command to run according to Spartacus Rex's instructions, I always get a 'Permission Denied' message. His command to run a script is: ./script_name.js
Spartacus gives examples in his help document with regards to running scripts he has written that come with this app of his (these scripts have a .sh extension). When running them according to the ./script_name.sh command, all works fine.
Again, this is not working for me as I try to run my own scripts from the Terminal IDE command line. Can someone please point me in the right direction? I am a novice at all this programming, but I can figure out a lot on my own if pointed in the right direction at least. Thanks for any help anyone can provide.
Those are not JavaScript Files you've been running with ./scriptName.sh , actually those are bash shell scripts, Google for it to know what these files actually are. When you create a custom shell script, do not forget to add execution permission to it : chmod +x your_custom_script.sh. I don't think you can actually run JavaScript files inside Terminal IDE
Not sure about links browser provided with it though