Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Gulp Basics Welcome to Gulp.js Installing Gulp

Why are some command lines not recognized in my text editor's terminal?

I use the Visual Studio Code text editor and whenever I type commands like 'which npm', 'ls -l', 'rm css/application.css', 'which node' and 'ls', I get responses in my terminal like:

" 'which' is not recognized as an internal or external command, operable program or batch file." or

" 'ls' is not recognized as an internal or external command, operable program or batch file." or

" 'rm' is not recognized as an internal or external command, operable program or batch file."

I have node and npm installed on my PC because even when I type 'node --version' and 'npm --version' I get their present semantic versioning as a response in my terminal. How can I fix this issue?

Ari Misha
Ari Misha
19,323 Points

Hiya there! Well looks like terminal file cant find either the path variable or the batch (.bat) file. what is your OS?

3 Answers

Ari Misha
Ari Misha
19,323 Points

Ahh! Treehouse mostly use UNIX and windows isnt UNIX. You probably need to learn few commands for Windows cmd. Try these commands:

  • see the list of all the files that current directory contains

    C:\Users\user> dir
    
  • make cmd throw all the variables set in path variable with

C:\Users\user> set
  • to remove a file from cmd
C:\Users\user>DEL [options] [/A:file_attributes] files_to_delete

I hope it helped!

~ Ari

Thanks a lot Ari, the commands you suggested are being responded to in my text editor. I'll go learn some more commands for Windows cmd.

Ari Misha
Ari Misha
19,323 Points

Well just remember that windows is different than all other OS out there. It isnt open sourced or UNIX. Thats why big entreprises prefer Linux. Hence its important to know UNIX commands as well if you wanna get a full time job as a Programmer. There is a course for UNIX console training in development tools section of Treehouse. Good luck!

David Kanwisher
David Kanwisher
9,751 Points

An alternative to using the windows command prompt is to install the git bash shell which can be found here:
https://git-for-windows.github.io

This will allow you to run Unix commands and interact with github easily

git BASH can also be integrated inside of visual studio as your default terminal application

Windows 8.1 pro