Search code examples
node.jslinuxvisual-studiocmdterminal

I am not able to move or navigate to a file in vscode terminal powershell


I have made a folder name notes and my terminal is present in notes folder currently and I am trying to move further in a file called web.js ,so I used command cd web/ which isn't seem to work and is always throwing error I also tried *cd ./web/ , cd .\web* ,nothing is working don't know why ? can anyone help me out? I need to open npm in my web.js file but not able to do so... Kindly Help:)! This is the error :

Devlopment\Notes\web\' because it does not exist.
At line:1 char:1
+ cd web/
+ ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:  
   \Web Devlopment\Notes\web\:String) [Set-Locat   
  ion], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Micros  
   oft.PowerShell.Commands.SetLocationCommand```

Solution

  • If you need to rund web.js you can use

    node web.js
    

    cd works only with folders. You can cd into notes but web.js is a file that you can run via scripts.