not able to run Node in Visual Studio Code - node.js

I installed node, bash and Visual studio Code on my windows 10 environment laptop.
I'm able to successfully run bash --version and node --version from the command line
but when I try to run the JavaScript file with the following command code object.js, I get the following error
bash: code: command not found
Any idea what I can do to get this working in visual studio code?

Related

Failed installing Node.js Choco Visual Studio 2019 build tools

I have been trying to install Node.js on my Windows 11 laptop. Everything seems to go fine. But while installing the build tools, it seems like it is unable to detect any supported Visual Studio Product.
Here is what the error I have been facing:
ERROR: Unable to detect any supported Visual Studio product. You may try passing --installPath or both --productId and --channelId parameters.
The upgrade of visualstudio2019-workload-vctools was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\visualstudio2019-workload-vctools\tools\ChocolateyInstall.ps1'.
See log for details.
**Failures
visualstudio2019-workload-vctools (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\visualstudio2019-workload-vctools\tools\ChocolateyInstall.ps1'.
See log for details.
visualstudio2019buildtools (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\visualstudio2019buildtools\tools\ChocolateyInstall.ps1'.
See log for details.**
Since I am new with it, I haven't tried anything yet.
Also, Node.js commands are running fine on Command Prompt. But it doesn't work when I try it out in the VSCode Terminal.

Android Studio Bumblebee 'pod install' command failed with an exception error=2

Yesterday I updated my Mac with Android Studio Bumblebee 2021.1.1 hoping that it would solve multiplatform issues I encounter.
Below some screenshots about my Mac and versions to be 100% clear:
Android Studio Bumblee About
macOs Monterey 12.2 iMac details
xCode 13.2.1 versions
Kotlin Multiplaform Mobile version
When I create a new KMM Application project I get errors. These are the steps (I can't post all screenshots): Basically accepting all default settings and followed by the final step:
New Project Step 3
After clicking finish on the New Project dialog Android Studio instantly shows an error in the bottom right corner: "Project wasn't configured"
Project wasn't configure error
After that I see these errors (text is below):
Android Studio build window output
'pod install' command failed with an exception: Cannot run program "pod" (in directory "/Users/johndoe/AndroidStudioProjects/MyApplication/iosApp"): error=2, No such file or directory
Possible reason: CocoaPods is not installed
Please check that CocoaPods v1.10 or above and cocoapods-generate plugin are installed.
To check CocoaPods version type 'pod --version' in the terminal
To install CocoaPods execute 'sudo gem install cocoapods'
To install cocoapod-generate execute 'sudo gem install cocoapods-generate'
The CocoaPods and cocoapod-generate are installed. When in the terminal window I can execute some commands succesfully (eg. pod --version (version 1.11.2) and pod install)
Android Studio Terminal output
Just to be clear: the directory and file it complains about do exist. I can navigate to it and run a succesful pod install and pod update command.
Is this a new bug and I'm just an early adaptor or is there a misconfiguration on my Mac? On my actual project I have the same error that compiled with the previous Android Studio version without any problems. I did have other challenges (see my different unanswered question).
There is an Android Studio bug report for this, including a workaround: https://issuetracker.google.com/issues/216364005#comment7
The root cause appear to be missing executable flag on Contents/bin/printenv file.
The workaround is to add missing flag: chmod +x /Applications/Android\ Studio.app/Contents/bin/printenv
If the above answer doesn't work for you, try checking $SHELL value in your IDE and in the terminal that you use. In my case they were different:
Android studio used zsh, which was unable to run pod command.
I personally use bash in the terminal. And I was able to run pod from it manually.
The solution was to switch to zsh and make pod work there by installing it with sudo gem install cocoapods.

Gradle works with Android Studio but cmd script fails

I freshly installed Android Studio and created a HelloWorld project. It works fine. But when I tried to build it via commandline gradlew script found in the project directory it first gave me the error that java is not installed.
After installing the java its now giving me the error:
FAILURE: Build failed with an exception.
What went wrong: Could not determine java version from '11.0.1'.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
Following image shows the java version and the command I executed:
Note: I am running it on a Mac with MacOS High Sierra (10.13.6)
This had something to do with my gradle version. I set the version to the latest by going to Project Structure selecting Project from side menu and set the Gradle version to 4.10.2.

Enide Studio 2015 on OSX - trying to debug

I've been doing command line development of node.js on my Mac OSX El Capitan machine for a bit but wanted to try an IDE. I loaded Eclipse Mars and added the Enide Studio 2015 from the marketplace.
Created both a example project and an express generator project but I can't seem to get them to run in either the debugger mode or run mode.
When I run debugger mode, it seem to run and shows in the console that it is running but when I go to http://localhost:5858/ I get a browser that only shows:
Type: connect
V8-Version: 4.6.85.28
Protocol-Version: 1
Embedding-Host: node v5.0.0
Content-Length: 0
Any ideas?
In package.json what script is execute for start ?
Then right-click that script.js
and Run as -> Node application
or Debug as -> Node application
npm does not have parameters to launch in debug mode

Visual C++ 2012 missing mspdb110.dll

I am trying to compile on cmd using cl and it says that I'm missing mspdb110.dll.
Anyone know how to fix this?
Edit: I added this file path to PATH C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin and the file is a standard hello world program
If you are trying to execute cl.exe from the command line, you need several environment variables added/modified. See here for further details:
Command line compile using cl.exe?
The version mentioned in that post is VS2010, for VS2012, you should be running 'Developer Command Prompt for VS2012', which will set the variables for you.

Resources