Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
stanislavromanov opened this issue Mar 29, 2016 · 23 comments
Closed

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

stanislavromanov opened this issue Mar 29, 2016 · 23 comments

Comments

@stanislavromanov
Copy link

  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
@dthree
Copy link
Owner

dthree commented Mar 29, 2016

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

@stanislavromanov
Copy link
Author

@dthree No errors whatsoever.

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

> cash-global@0.2.0 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

> cash-global@0.2.0 postinstall C:\Users\stani\AppData\Roaming\npm\node_modules\cash-global
> node ./bin/postinstall.js

C:\Users\stani\AppData\Roaming\npm
`-- cash-global@0.2.0
  `-- cash@0.8.0
    +-- array-shuffle@1.0.0
    +-- chalk@1.1.3
    | +-- ansi-styles@2.2.1
    | +-- escape-string-regexp@1.0.5
    | +-- has-ansi@2.0.0
    | | `-- ansi-regex@2.0.0
    | +-- strip-ansi@3.0.1
    | `-- supports-color@2.0.0
    +-- filesize@3.2.1
    +-- fkill@3.1.0
    | +-- arrify@1.0.1
    | +-- pify@2.3.0
    | +-- pinkie-promise@2.0.0
    | | `-- pinkie@2.0.4
    | `-- taskkill@1.0.0
    +-- fs-extra@0.23.1
    | +-- graceful-fs@4.1.3
    | +-- jsonfile@2.2.3
    | +-- path-is-absolute@1.0.0
    | `-- rimraf@2.5.2
    |   `-- glob@7.0.3
    +-- glob@6.0.4
    | +-- inflight@1.0.4
    | | `-- wrappy@1.0.1
    | +-- inherits@2.0.1
    | +-- minimatch@3.0.0
    | | `-- brace-expansion@1.1.3
    | |   +-- balanced-match@0.3.0
    | |   `-- concat-map@0.0.1
    | `-- once@1.3.3
    +-- lodash@4.6.1
    +-- minimist@1.2.0
    +-- user-home@2.0.0
    | `-- os-homedir@1.0.1
    +-- username@1.0.1
    | `-- meow@3.7.0
    |   +-- camelcase-keys@2.1.0
    |   | `-- camelcase@2.1.1
    |   +-- decamelize@1.2.0
    |   +-- loud-rejection@1.3.0
    |   | +-- array-find-index@1.0.1
    |   | `-- signal-exit@2.1.2
    |   +-- map-obj@1.0.1
    |   +-- normalize-package-data@2.3.5
    |   | +-- hosted-git-info@2.1.4
    |   | +-- is-builtin-module@1.0.0
    |   | | `-- builtin-modules@1.1.1
    |   | +-- semver@5.1.0
    |   | `-- validate-npm-package-license@3.0.1
    |   |   +-- spdx-correct@1.0.2
    |   |   | `-- spdx-license-ids@1.2.0
    |   |   `-- spdx-expression-parse@1.0.2
    |   |     `-- spdx-exceptions@1.0.4
    |   +-- object-assign@4.0.1
    |   +-- read-pkg-up@1.0.1
    |   | +-- find-up@1.1.2
    |   | | `-- path-exists@2.1.0
    |   | `-- read-pkg@1.1.0
    |   |   +-- load-json-file@1.1.0
    |   |   | +-- parse-json@2.2.0
    |   |   | | `-- error-ex@1.3.0
    |   |   | |   `-- is-arrayish@0.2.1
    |   |   | `-- strip-bom@2.0.0
    |   |   |   `-- is-utf8@0.2.1
    |   |   `-- path-type@1.1.0
    |   +-- redent@1.0.0
    |   | +-- indent-string@2.1.0
    |   | | `-- repeating@2.0.0
    |   | |   `-- is-finite@1.0.1
    |   | `-- strip-indent@1.0.1
    |   |   `-- get-stdin@4.0.1
    |   `-- trim-newlines@1.0.0
    +-- vorpal@1.10.10
    | +-- babel-polyfill@6.7.4
    | | +-- babel-regenerator-runtime@6.5.0
    | | +-- babel-runtime@5.8.38
    | | | `-- core-js@1.2.6
    | | `-- core-js@2.2.1
    | +-- in-publish@2.0.0
    | +-- inquirer@0.11.0
    | | +-- ansi-escapes@1.3.0
    | | +-- cli-cursor@1.0.2
    | | | `-- restore-cursor@1.0.1
    | | |   +-- exit-hook@1.1.1
    | | |   `-- onetime@1.1.0
    | | +-- cli-width@1.1.1
    | | +-- figures@1.5.0
    | | +-- lodash@3.10.1
    | | +-- readline2@1.0.1
    | | | +-- code-point-at@1.0.0
    | | | | `-- number-is-nan@1.0.0
    | | | +-- is-fullwidth-code-point@1.0.0
    | | | `-- mute-stream@0.0.5
    | | +-- run-async@0.1.0
    | | +-- rx-lite@3.1.2
    | | `-- through@2.3.8
    | +-- log-update@1.0.2
    | +-- node-localstorage@0.6.0
    | `-- wrap-ansi@2.0.0
    |   `-- string-width@1.0.1
    +-- vorpal-autocomplete-fs@0.0.3
    +-- vorpal-grep@0.1.2
    | `-- glob@5.0.15
    `-- vorpal-less@0.0.13
      `-- slice-ansi@0.0.3


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

C:\Users\stani>

@dthree
Copy link
Owner

dthree commented Mar 29, 2016

Huh. Interesting.

Did it work before you restarted the PC?

@stanislavromanov
Copy link
Author

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

@mrmlnc
Copy link

mrmlnc commented Mar 29, 2016

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

@nfischer
Copy link
Collaborator

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!

@stanislavromanov
Copy link
Author

@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.

@Arcanemagus
Copy link

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 $.

@dthree
Copy link
Owner

dthree commented Mar 30, 2016

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.

@stanislavromanov
Copy link
Author

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

@mrmlnc
Copy link

mrmlnc commented Mar 30, 2016

@stanislavromanov Holy Grail! 💣 💥

@dthree
Copy link
Owner

dthree commented Mar 30, 2016

Amazing, right? 😄 🔥 💣

@tangsilian
Copy link

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

good luck

@loilo
Copy link

loilo commented Apr 7, 2016

May this be related to #74?

@xtreemrage
Copy link

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

@SphinxTwo
Copy link

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

@Arcanemagus
Copy link

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

@tandyjames
Copy link

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 :).

@StefanDimov
Copy link

StefanDimov commented Dec 1, 2016

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

@gonzalocasas
Copy link

Same problem here, win10, node v7.3.0

@hoelter
Copy link

hoelter commented Feb 24, 2017

Same here, win 10.

@expresado
Copy link

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

@jaylamsen
Copy link

type cash first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests