简体   繁体   中英

Is there a way to run Node.js with Bash commands in Windows?

I am trying to learn Node.js. When I download Node.js for Windows, I get the command prompt version for Windows, and I am wondering if there is a way to get a UNIX environment for Node.js in Windows. Most of the tutorials I read and watched just skip over this and I can't find anything on this.

Also, I am having a problem changing hard drives in Node.js command prompt. When I try cd f:myDir , it prints the directory instead of switching to it.

I figured it out. I had to use Cygwin for a UNIX environment while using Node.js. Download Cygwin here: https://www.cygwin.com/

I didn't have to mess with Environment Variables.

As of the Summer 2016 update to Windows 10, a Linux shell environment for Windows is available .

  • Install Windows 10 version 14316 via Windows Update
  • Go to Updates & Security > For Developers > Developer Mode
  • Go to Control Panel > Programs and Features > Turn Windows features on or off > Windows Subsystem for Linux
  • Restart
  • Open the Start menu and search for bash

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM