cash
cash copied to clipboard
[Windows 10] npm install cash-global -g does not work
-
npm install cash-global -g
- Restart pc
-
'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
Was there any installation errors? Can you show me the text from the installation?
@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>
Huh. Interesting.
Did it work before you restarted the PC?
Nope, I just tried it and it didn't work. :)
I am also having this problem on Windows 10 (build 1511) with Node js v5.9.0 and npm v3.8.5.
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 Well I don't think the problem is with PATH
because every other npm module works fine. Even cash
itself, just not cash-global
.
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 $
.
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.
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 Holy Grail! :bomb: :boom:
Amazing, right? :smile: :fire: :bomb:
Nope, I just tried it and it didn't work. :)
good luck
May this be related to #74?
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
Wouldn't you need to type in cash
before using ls?
@SphinxTwo The entire point of cash-global
is so you don't have to type cash
before using the commands 😛.
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 :).
+1, Having the same problem on win10 and win8 node v6.9.1 npm v3.10.8
Same problem here, win10, node v7.3.0
Same here, win 10.
it is only global problem at least in my environment. If you run cash and run grep in there it is fully functional.
type cash first