cash icon indicating copy to clipboard operation
cash copied to clipboard

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

Open stanislavromanov opened this issue 8 years ago • 23 comments

  1. npm install cash-global -g
  2. Restart pc
  3. 'ls' is not recognized as an internal or external command, operable program or batch file

However when I do cash it works as before. Am I missing something?

C:\Users\stani>node -v
v5.9.1
C:\Users\stani>npm -v
3.8.3

stanislavromanov avatar Mar 29 '16 18:03 stanislavromanov

Was there any installation errors? Can you show me the text from the installation?

dthree avatar Mar 29 '16 18:03 dthree

@dthree No errors whatsoever.

C:\Users\stani>npm install cash-global -g

> [email protected] preinstall C:\Users\stani\AppData\Roaming\npm\node_modules\.staging\cash-global-4e34e430
> node ./bin/preinstall.js

Installed:      clear
Installed:      cp
Installed:      false
Installed:      kill
Installed:      ls
Installed:      mkdir
Installed:      mv
Installed:      pwd
Installed:      touch
Installed:      true
Installed:      cat
Installed:      grep
Installed:      rm

C:\Users\stani\AppData\Roaming\npm\cash -> C:\Users\stani\AppData\Roaming\npm\node_modules\cash-global\node_modules\cash\bin\cash.js
C:\Users\stani\AppData\Roaming\npm\$ -> C:\Users\stani\AppData\Roaming\npm\node_modules\cash-global\node_modules\cash\bin\cash.js

> [email protected] postinstall C:\Users\stani\AppData\Roaming\npm\node_modules\cash-global
> node ./bin/postinstall.js

C:\Users\stani\AppData\Roaming\npm
`-- [email protected]
  `-- [email protected]
    +-- [email protected]
    +-- [email protected]
    | +-- [email protected]
    | +-- [email protected]
    | +-- [email protected]
    | | `-- [email protected]
    | +-- [email protected]
    | `-- [email protected]
    +-- [email protected]
    +-- [email protected]
    | +-- [email protected]
    | +-- [email protected]
    | +-- [email protected]
    | | `-- [email protected]
    | `-- [email protected]
    +-- [email protected]
    | +-- [email protected]
    | +-- [email protected]
    | +-- [email protected]
    | `-- [email protected]
    |   `-- [email protected]
    +-- [email protected]
    | +-- [email protected]
    | | `-- [email protected]
    | +-- [email protected]
    | +-- [email protected]
    | | `-- [email protected]
    | |   +-- [email protected]
    | |   `-- [email protected]
    | `-- [email protected]
    +-- [email protected]
    +-- [email protected]
    +-- [email protected]
    | `-- [email protected]
    +-- [email protected]
    | `-- [email protected]
    |   +-- [email protected]
    |   | `-- [email protected]
    |   +-- [email protected]
    |   +-- [email protected]
    |   | +-- [email protected]
    |   | `-- [email protected]
    |   +-- [email protected]
    |   +-- [email protected]
    |   | +-- [email protected]
    |   | +-- [email protected]
    |   | | `-- [email protected]
    |   | +-- [email protected]
    |   | `-- [email protected]
    |   |   +-- [email protected]
    |   |   | `-- [email protected]
    |   |   `-- [email protected]
    |   |     `-- [email protected]
    |   +-- [email protected]
    |   +-- [email protected]
    |   | +-- [email protected]
    |   | | `-- [email protected]
    |   | `-- [email protected]
    |   |   +-- [email protected]
    |   |   | +-- [email protected]
    |   |   | | `-- [email protected]
    |   |   | |   `-- [email protected]
    |   |   | `-- [email protected]
    |   |   |   `-- [email protected]
    |   |   `-- [email protected]
    |   +-- [email protected]
    |   | +-- [email protected]
    |   | | `-- [email protected]
    |   | |   `-- [email protected]
    |   | `-- [email protected]
    |   |   `-- [email protected]
    |   `-- [email protected]
    +-- [email protected]
    | +-- [email protected]
    | | +-- [email protected]
    | | +-- [email protected]
    | | | `-- [email protected]
    | | `-- [email protected]
    | +-- [email protected]
    | +-- [email protected]
    | | +-- [email protected]
    | | +-- [email protected]
    | | | `-- [email protected]
    | | |   +-- [email protected]
    | | |   `-- [email protected]
    | | +-- [email protected]
    | | +-- [email protected]
    | | +-- [email protected]
    | | +-- [email protected]
    | | | +-- [email protected]
    | | | | `-- [email protected]
    | | | +-- [email protected]
    | | | `-- [email protected]
    | | +-- [email protected]
    | | +-- [email protected]
    | | `-- [email protected]
    | +-- [email protected]
    | +-- [email protected]
    | `-- [email protected]
    |   `-- [email protected]
    +-- [email protected]
    +-- [email protected]
    | `-- [email protected]
    `-- [email protected]
      `-- [email protected]


C:\Users\stani>ls
'ls' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\stani>

stanislavromanov avatar Mar 29 '16 18:03 stanislavromanov

Huh. Interesting.

Did it work before you restarted the PC?

dthree avatar Mar 29 '16 20:03 dthree

Nope, I just tried it and it didn't work. :)

stanislavromanov avatar Mar 29 '16 20:03 stanislavromanov

I am also having this problem on Windows 10 (build 1511) with Node js v5.9.0 and npm v3.8.5.

mrmlnc avatar Mar 29 '16 20:03 mrmlnc

Is the cash-ls module actually getting installed? You would have to check the location of your global installs (npm config get prefix might point you closer to the right spot, but I'm not 100% sure).

Next thing I can think of would be to check the value of your PATH env var. Try running echo %PATH% in a windows terminal to see its value (or echo $PATH in a cash terminal, if you're daring). Hope this helps!

nfischer avatar Mar 29 '16 23:03 nfischer

@nfischer Well I don't think the problem is with PATH because every other npm module works fine. Even cash itself, just not cash-global.

stanislavromanov avatar Mar 30 '16 08:03 stanislavromanov

I had this problem back when I first tried this, from what I remember of my investigation then for some reason the *.bat wrapper scripts weren't getting created for the sub-modules, only cash and $.

Arcanemagus avatar Mar 30 '16 16:03 Arcanemagus

Looks like a sequencing thing. NPM does bindings based on the bin object in package.json, and originally only cash and $ are there. Following a check of the user's existing commands (checking for duplicates from other installations), Cash global then runs script hooks to re-write the package.json and then run the linkings again. However, it looks like NPM is inconsistent on how it does this, as certain Windows versions work as expected and others don't.

dthree avatar Mar 30 '16 16:03 dthree

Well I guess we don't be needing this as Windows Bash replacement soon enough: http://blog.dustinkirkland.com/2016/03/ubuntu-on-windows.html

stanislavromanov avatar Mar 30 '16 17:03 stanislavromanov

@stanislavromanov Holy Grail! :bomb: :boom:

mrmlnc avatar Mar 30 '16 17:03 mrmlnc

Amazing, right? :smile: :fire: :bomb:

dthree avatar Mar 30 '16 17:03 dthree

Nope, I just tried it and it didn't work. :)

good luck

tangsilian avatar Mar 31 '16 07:03 tangsilian

May this be related to #74?

loilo avatar Apr 07 '16 07:04 loilo

I have the same, I have an english version of windows 10.

npm -v
3.3.12

node -v
v5.9.1

OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.10586 N/A Build 10586

xtreemrage avatar Apr 12 '16 11:04 xtreemrage

Wouldn't you need to type in cash before using ls?

SphinxTwo avatar Aug 19 '16 14:08 SphinxTwo

@SphinxTwo The entire point of cash-global is so you don't have to type cash before using the commands 😛.

Arcanemagus avatar Aug 19 '16 17:08 Arcanemagus

I'm having the same issue on windows 8.1. Let me know if there is anything I can do to help :). Very cool idea, I miss my linux commands :).

tandyjames avatar Sep 29 '16 14:09 tandyjames

+1, Having the same problem on win10 and win8 node v6.9.1 npm v3.10.8

StefanDimov avatar Dec 01 '16 20:12 StefanDimov

Same problem here, win10, node v7.3.0

gonzalocasas avatar Feb 06 '17 13:02 gonzalocasas

Same here, win 10.

hoelter avatar Feb 24 '17 03:02 hoelter

it is only global problem at least in my environment. If you run cash and run grep in there it is fully functional.

expresado avatar Mar 14 '17 07:03 expresado

type cash first

jaylamsen avatar Jun 27 '17 14:06 jaylamsen