dthree / cash

Cross-platform Linux commands in ES6

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Windows 10] npm install cash-global -g does not work

taslimy opened this issue · comments

  1. npm install cash-global -g

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

C:\Users\Taslim>node -v
v6.11.2

C:\Users\Taslim>npm -v
3.10.10

Am i doing something incorrect?

Duplicate of #83

Unfortunately, I don't think we ever solved this issue. I'm not very knowledgeable in this area.

Alternatively i did this just to got all the commands through Unxutils which is just a port which works on windows.
https://www.julienklepatch.com/improve-windows-command-line/#section2

Steps to install

1. Download Unxutils and unzip it to your `C:\`

2. Rename the folder to `unxutils` to have it all in lowercase letters.

3. Navigate it to add environment variables. search `edit system environment variables` on win 10.

4. A window called System Properties will show up and if you not in the `Advanced Tab` click that tab and at the bottom you'll see Environment Variables

5. Then click `new` and window will pop up asking you to input the variables.

Variable name: PATH

Variable Value: C:\unxutils\usr\local\wbin

6. Then click ok.

7. Use Windows PowerShell everything will works as it should.

My Demo using Windows PowerShell

PS C:\Users\Taslim> cd desktop
PS C:\Users\Taslim\desktop> mkdir test2


    Directory: C:\Users\Taslim\desktop


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----       10/25/2017  10:46 PM                test2


PS C:\Users\Taslim\desktop> cd test2
PS C:\Users\Taslim\desktop\test2> touch index.html index.js index.css
PS C:\Users\Taslim\desktop\test2> ls


    Directory: C:\Users\Taslim\desktop\test2


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----       10/25/2017  10:47 PM              0 index.css
-a----       10/25/2017  10:47 PM              0 index.html
-a----       10/25/2017  10:47 PM              0 index.js

Hope this helps anyone.