Jump to content

Terminal in Community Visual Studio 2017

tzebe_tzebe1

Hello, 

 

I was wondering how I could open the integrated terminal on the community version of Visual Studio 2017. Or is there any ? 

I hope someone could help me out. 

Thank you :)

Link to comment
Share on other sites

Link to post
Share on other sites

There's Package Manager console which is actually an interactive terminal that uses Powershell. Check up on View > Other Windows context menu for additional interactive windows for various languages like R, Python, C#, F#, and NodeJS (assuming you installed the feature via Visual Studios Installer.)

Link to comment
Share on other sites

Link to post
Share on other sites

29 minutes ago, FreeDev said:

There's Package Manager console which is actually an interactive terminal that uses Powershell. Check up on View > Other Windows context menu for additional interactive windows for various languages like R, Python, C#, F#, and NodeJS (assuming you installed the feature via Visual Studios Installer.)

right, this is what I meant. Although the terminal doesn't seem to understand my commands. I wrote a small block-chain, and when I type: node main.js  it tells me it doesn't recognize node. (The term 'node' is not recognized as the name of a cmdlet, function, script file, or operable program). Does this mean I went wrong somewhere in my code? Or I need to install something for it to recognize this? 

Link to comment
Share on other sites

Link to post
Share on other sites

Make sure you install or reinstall Nodejs with PATH environment variable set. NodeJS Installer

You may have to reboot the computer when finish installing NodeJS. I wouldn't recommend running Node on Powershell interactive window in Visual Studios, it would just hang Powershell without anyway to exit Node, instead you can access Nodejs from View > Other Windows > Node.js Interactive Window assuming you have it installed as one of the Visual Studios feature and I've attached the screenshot:

 

 

NodeJS.png

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, FreeDev said:

Make sure you install or reinstall Nodejs with PATH environment variable set. NodeJS Installer

You may have to reboot the computer when finish installing NodeJS. I wouldn't recommend running Node on Powershell interactive window in Visual Studios, it would just hang Powershell without anyway to exit Node, instead you can access Nodejs from View > Other Windows assuming you have it installed as one of the Visual Studios feature and I've attached the screenshot:

 

 

NodeJS.png

I'm completely new to this. So what exactly do you mean by "PATH environment variable set". Thank you so much for the link. I will install it, reboot my PC and try this. Thank you so much. 

Link to comment
Share on other sites

Link to post
Share on other sites

It basically let shell like Command Prompt or other software know where to find the binary at which includes commands like netstat, trace, dir and so forth. By adding new path to the PATH environment variable, you basically allow those software to look up on additional programs you want to run from command prompt or whatever else shell you have.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, FreeDev said:

It basically let shell like Command Prompt or other software know where to find the binary at which includes commands like netstat, trace, dir and so forth. By adding new path to the PATH environment variable, you basically allow those software to look up on additional programs you want to run from command prompt or whatever else shell you have.

Okay, right. And it doesn't matter where I install this NodeJS , or is there a specific place for it to go? 

Link to comment
Share on other sites

Link to post
Share on other sites

It shouldn't matter where you install it as long as it add the path to PATH environment variable.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, FreeDev said:

It shouldn't matter where you install it as long as it add the path to PATH environment variable.

Great, thank you so much. 

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, tzebe_tzebe1 said:

Great, thank you so much. 

Okay, sorry this is a dumb question. But how do I set this path to PATH environment variable? is it in the Tools?  

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, FreeDev said:

It would be included as one of the option in NodeJS installer, I've included the screenshot to highlight this.

NodeJS.png

ohhh, okay I see. 

Link to comment
Share on other sites

Link to post
Share on other sites

31 minutes ago, FreeDev said:

It would be included as one of the option in NodeJS installer, I've included the screenshot to highlight this.

NodeJS.png

Right so I have done everything. However after after when I type in node main.js  it gives me this error now in the console: 

 

module.js:540
    throw err;
    ^

Error: Cannot find module 'C:\Users\tbh\source\repos\Blockchain\main.js'
    at Function.Module._resolveFilename (module.js:538:15)
    at Function.Module._load (module.js:468:25)
    at Function.Module.runMain (module.js:684:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

It seems that Node.js is working properly, it just that your blockchain program is throwing an error. I would backtrack module.js:540 and upward to investigate why it's throwing the exception. I don't do programming with Node.js however.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, FreeDev said:

It seems that Node.js is working properly, it just that your blockchain program is throwing an error. I would backtrack module.js:540 and upward to investigate why it's throwing the exception. I don't do programming with Node.js however.

Yea, node.js is working. Its something in my code.. 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×