Giter VIP home page Giter VIP logo

cash's Introduction

hey there


I'm the Co-Founder & CTO at MindCloud, a rapidly growing B2B startup in the integration space. I've been writing production software for 16 years with an emphasis on designing and building data-heavy platforms from the ground up.

You can follow me on Twitter.


I had fun building some original OSS projects in the past for the Node community:

  • Vorpal - Interactive CLI framework for Node
  • Cash - Cross-platform unix coreutils in Javascript
  • Vantage - Distributed, realtime CLI for live Node apps

cash's People

Contributors

addaleax avatar anatoliygatt avatar andregarvin avatar ariporad avatar cspotcode avatar dthree avatar i-am-steve-oh avatar j-em avatar khuongduybui avatar nfischer avatar nicoder avatar obastemur avatar richyhbm avatar safinn avatar sonnyp avatar tcyrus avatar tooolbox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cash's Issues

Some apps that are in path aren't recognized

Some external windows commands work (eg. ipconfig) while others do not (eg. grunt, code): is there something that could be done to fix it ?

Right now cash is quite useless if I cannot run grunt :)

ReferenceError: cash is not defined

I am not a native node.js user and was testing this on an 8.1 windows enterprise -N version.

I followed the install instructions in administrative rights. I did an install of node.js 64bit from the node.js site though the 64bit msi which would also install the npm package manager. https://nodejs.org/en/download/
after installation
first trying
npm install cash-global -g ( also additional question, does this add the ENV variable to the system, and if not, what is the path?)
(ps. I also tried this with npm install cash -g as well)

I verified that all modules required for package were installed. which were applied to

C:\USERS\$user\AppData\Roaming\npm\node_modules\

When trying to run

error

C:\Windows\system32>node
> cash
ReferenceError: cash is not defined
    at repl:1:1
    at REPLServer.defaultEval (repl.js:252:27)
    at bound (domain.js:287:14)
    at REPLServer.runBound [as eval] (domain.js:300:12)
    at REPLServer.<anonymous> (repl.js:417:12)
    at emitOne (events.js:82:20)
    at REPLServer.emit (events.js:169:7)
    at REPLServer.Interface._onLine (readline.js:211:10)
    at REPLServer.Interface._line (readline.js:550:8)
    at REPLServer.Interface._ttyWrite (readline.js:827:14)

readline.js, domain.js, repl.js were also verified as installed afterwards to verify and still received error.

Any ideas?

Incorrect behavior for ls

I noticed a few main issues with ls so far:

  1. ls filedoesntexist should output a message of the form ls: cannot access filedoesntexist: No such file or directory. Currently, it has no output.

  2. Calling ls with multiple arguments causes files to look kind of like directories. This has output like:

    cash $ ls README.md appveyor.yml src
    README.md:
    README.md
    
    appveyor.yml:
    appveyor.yml
    
    src:
    commands  delimiter.js  help  help.js  index.js  lib  preparser.js  util  windows.js
    

    whereas I would expect:

    cash $ ls README.md appveyor.yml src
    appveyor.yml README.md
    
    src:
    commands  delimiter.js  help  help.js  index.js  lib  preparser.js  util  windows.js
    
  3. Calling ls on non-existing files, if there are multiple arguments, treats them like empty directories:

    cash $ ls noexist1 noexist2
    noexist1:
    
    
    noexist2:
    
    

    whereas I would expect:

    cash $ ls noexist1 noexist2
    ls: cannot access noexist1: No such file or directory
    ls: cannot access noexist2: No such file or directory
    

I suspect solving bugs 1 and 2 will solve 3 for you.

All of this is running off the latest release of cash on Ubuntu.

Add support for $? variable

This would be useful for viewing the return status of functions.

Ex:

bash $ true
bash $ echo $?
0
bash $ false
bash $ echo $?
1
bash $ git status # assuming this isn't a git repo
fatal: Not a git repository (or any of the parent directories): .git
bash $ echo $?
128

which

I love cash! A which command would be helpful. When I have a chance, I'd be happy to implement it. This might be a good start to it.

Unexpected Exit on Grep.

Initially I attempted a "grep" to search for a string inside a file using the -irl flags and found that the -L (lowercase) was not available but then tried the -n flag instead

Command executed

grep -irn "test" *

cash exits to windows prompt.

verification of error.

root:C/Users/Public/Documents$ root:C/Users/Public/Documents$ mkdir test1, test2, test3

root:C/Users/Public/Documents$ ls
desktop.ini My Music  My Pictures  My Videos  test1,  test2,  test3

root:C/Users/Public/Documents$ grep -irn "test" *
readline.js:925
            throw err;
            ^

SyntaxError: Invalid regular expression: /(*)/: Nothing to repeat
    at RegExp (native)
    at new RegExp (C:\Users\$user\AppData\Roaming\npm\node_modules\cash-global\node_modules\cash\node_modules\vorpal\node_modules\babel-polyfill\node_mo
dules\core-js\modules\es6.regexp.constructor.js:26:11)
    at CommandInstance.exec (C:\Users\$user\AppData\Roaming\npm\node_modules\cash-global\node_modules\cash\node_modules\vorpal-grep\dist\grep.js:23:19)
    at CommandInstance.<anonymous> (C:\Users\$user\AppData\Roaming\npm\node_modules\cash-global\node_modules\cash\node_modules\vorpal-grep\dist\grep.js:
97:15)
    at EventEmitter.session.execCommandSet (C:\Users\$user\AppData\Roaming\npm\node_modules\cash-global\node_modules\cash\node_modules\vorpal\dist\sessi
on.js:476:20)
    at EventEmitter.vorpal._exec (C:\Users\$user\AppData\Roaming\npm\node_modules\cash-global\node_modules\cash\node_modules\vorpal\dist\vorpal.js:970:1
8)
    at EventEmitter.vorpal._execQueueItem (C:\Users\$user\AppData\Roaming\npm\node_modules\cash-global\node_modules\cash\node_modules\vorpal\dist\vorpal
.js:761:17)
    at EventEmitter.vorpal._queueHandler (C:\Users\$user\AppData\Roaming\npm\node_modules\cash-global\node_modules\cash\node_modules\vorpal\dist\vorpal.
js:745:10)
    at EventEmitter.vorpal.exec (C:\Users\$user\AppData\Roaming\npm\node_modules\cash-global\node_modules\cash\node_modules\vorpal\dist\vorpal.js:692:10
)
    at C:\Users\$user\AppData\Roaming\npm\node_modules\cash-global\node_modules\cash\node_modules\vorpal\dist\vorpal.js:635:10
readline.js:925
            throw err;
            ^

SyntaxError: Invalid regular expression: /(*)/: Nothing to repeat
    at RegExp (native)
    at new RegExp (C:\Users\$user\AppData\Roaming\npm\node_modules\cash-global\node_modules\cash\node_modules\vorpal\node_modules\babel-polyfill\node_mo
dules\core-js\modules\es6.regexp.constructor.js:26:11)
    at CommandInstance.exec (C:\Users\$user\AppData\Roaming\npm\node_modules\cash-global\node_modules\cash\node_modules\vorpal-grep\dist\grep.js:23:19)
    at CommandInstance.<anonymous> (C:\Users\$user\AppData\Roaming\npm\node_modules\cash-global\node_modules\cash\node_modules\vorpal-grep\dist\grep.js:
97:15)
    at EventEmitter.session.execCommandSet (C:\Users\$user\AppData\Roaming\npm\node_modules\cash-global\node_modules\cash\node_modules\vorpal\dist\sessi
on.js:476:20)
    at EventEmitter.vorpal._exec (C:\Users\$user\AppData\Roaming\npm\node_modules\cash-global\node_modules\cash\node_modules\vorpal\dist\vorpal.js:970:1
8)
    at EventEmitter.vorpal._execQueueItem (C:\Users\$user\AppData\Roaming\npm\node_modules\cash-global\node_modules\cash\node_modules\vorpal\dist\vorpal
.js:761:17)
    at EventEmitter.vorpal._queueHandler (C:\Users\$user\AppData\Roaming\npm\node_modules\cash-global\node_modules\cash\node_modules\vorpal\dist\vorpal.
js:745:10)
    at EventEmitter.vorpal.exec (C:\Users\$user\AppData\Roaming\npm\node_modules\cash-global\node_modules\cash\node_modules\vorpal\dist\vorpal.js:692:10
)
    at C:\Users\$user\AppData\Roaming\npm\node_modules\cash-global\node_modules\cash\node_modules\vorpal\dist\vorpal.js:635:10

I don't know if this output will help and I'm not sure if there is an issue with an thirdparty .js, however I did test this exit with the following commands just to verify as well.. same result of exiting.

grep -irn "test*" *
grep -irn 'test*' *
grep -irn 'test' *

standalone cash-cat doesn't copy stdin

Cool project!

When using cash-cat as a standalone command, it doesn't appear to support copying stdin when no arguments are present. For example:

    npm install cash-cat
    $ echo hi | ./node_modules/.bin/cat
    $

Am I doing something wrong here?

Thanks,
Kevin

`ls -s` is missing

I'm very used to typing ls -las. It's in my bones. But the -s option isn't available - so can it please be implemented? Or, since the size is already printed with ls -la, it could also be ignored...

Right now it prints an error message for this switch, even though, technically speaking, it's not an error. It's just not implemented ;)

`touch -c file.txt` doesn't work

I tried running:

cash $ touch -c file.txt


  Missing required argument. Showing Help:

  Usage: touch [options] <files...>


  Options:

    --help                  output usage information
    -a                      change only the access time
    -c, --no-create         do not create any files
    -d, --date [STRING]     parse STRING and use it instead of current time
    -m                      change only the modification time
    -r, --reference [FILE]  use this file's times instead of current time
    --time [WORD]           change the specified time: WORD is access, atime, or use: equivalent to -a WORD is modify or mtime: equivalent to -m

This doesn't seem to be the correct output. This happens whether the file I specify exists or doesn't exist.

Also, if I run this:

cash $ touch -c file1.txt file2.txt file3.txt

It creates file2.txt and file3.txt, when it should actually create no new files.

Add support for ";", "&&", and "||"

Bash supports the syntax cmd1;cmd2, which executes the first command and then executes the second command (it's the same as if these were two different commands). Also, Bash supports cmd1 && cmd2 (execute the first command, if it succeeds execute the second) and cmd1 || cmd2 (execute the first command, if it fails execute the second). These would be awesome features to support.

Not sure if this should be handled by vorpal or by cash, but I figured I would post it here since this is the use-case I had in mind.

Add a .cash_profile!

It would be cool to have something like a .bash_profile for cash! (not sure if this is already implemented. My bad if it exists)

Large file support

While reading the source, I noticed that a number of commands, at least head and cat when given a file argument, read in the entire file in memory before doing anything else. This may work fine for small files, but if you want to take the oldest few lines from a HUGE logfile, for example, or when wanting a few bytes from /dev/urandom, this will create a performance problem. Might be related to the cat hangup symptom here. (^C problem might or might not be related?)
I also noticed that a command gets its entire stdin input from the calling function (presumably vorpal); same argument holds.

I've not had the chance to test the actual behaviour of the program as I don't have a desktop nearby at the moment, so sorry for that; but if I'm not mistaken, per-line buffering might be a good idea.

Last but not least: great project, keep up the good work! :)

ls with both directory and file arguments still isn't quite right

Just tried this after #60 got merged. The output still doesn't seem quite right. Here's the output I'm seeing from cash:

bash $ ./bin/cash.js
nate@lenovoyoga:~/programming/cash$ ls README.md bin/
README.mdalias.js    cash.js     cat.js      cd.js       clear.js
cp.js       echo.js     export.js   false.js    grep.js
head.js     kill.js     less.js     ls.js       mkdir.js
mv.js       parser.js   pwd.js      rm.js       sort.js
source.js   tail.js     touch.js    true.js     unalias.js
nate@lenovoyoga:~/programming/cash$ exit
bash $ ls README.md bin/
README.md

bin/:
alias.js  cp.js      head.js   mv.js      source.js
cash.js   echo.js    kill.js   parser.js  tail.js
cat.js    export.js  less.js   pwd.js     touch.js
cd.js     false.js   ls.js     rm.js      true.js
clear.js  grep.js    mkdir.js  sort.js    unalias.js

If multiple arguments are passed, directories should be displayed with the directory name above, followed by a colon (ex. bin/:). I couldn't find this issue if only directory arguments are used, only when both file and directory arguments are used.

Single quotes don't work?

Of the following two lines, the first line fails, the second line works:

alias ll='ls -la'
alias ll="ls -la"

I tried it twice, with the same results:

  1. Running PowerShell inside ConEmu, then typing cash
  2. Running cmd.exe inside its own window, then typing cash

The error I get is this:

$ alias ll='ls -la'

  Invalid option: 'l'. Showing Help:

  Usage: alias [options] [name...]


  Options:

    --help  output usage information
    -p  print all defined aliases in a reusable format

Invalid export from package.json

Programmatic access is stone cold busted.

This is the result of a bad main reference to ./lib/index.js in package.json: https://github.com/dthree/cash/blob/master/package.json#L5. I'm guessing we want ./dist/index.js instead since that file exists

Example of bad things happening:

โฏ npm install cash
[email protected] node_modules/cash
โ”œโ”€โ”€ [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])

โฏ node -e 'var $ = require("cash");'
module.js:327
    throw err;
    ^

Error: Cannot find module 'cash'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at [eval]:1:9
    at Object.exports.runInThisContext (vm.js:54:17)
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:409:26)
    at node.js:574:27
    at nextTickCallbackWith0Args (node.js:415:9)

โฏ node -e 'console.log(require("./node_modules/cash/package.json").main)'
./lib/index.js

I'll work up a PR real quick.

unit tests modify my cashrc file

The unit tests unfortunately wipe out my ~/.cashrc file and don't replace it. This isn't the most user-friendly behavior, since I'd actually like to be able to write up configurations in there eventually as cash evolves. And I'm not the biggest fan of having a file named fizzlecrumbs on my file system...

Any chance we could either get rid of this test or find a way to reliable replace the file after tests are done (and provide a warning if the file isn't restored)?

Specify custom command syntax using vorpal?

This is somewhat related to vorpal, but I posted it here in case there's a way to do a parsing work around to leave the vorpal stuff untouched.

Is there a way to specify a custom syntax using vorpal? The syntax I'm interested in is something like <id>=[value] (this is what variable reassignment looks like).

If it's possible to write something to recognize that form and preparse it to the form _assign <id> [value], that's probably a good enough work around, since that would let assign be treated like a regular command.

MSI Installer

What all did you need for an installer? Depending on how complex you need it, I (or others) might be able to help. A couple things about installers:

  • For generating vanilla MSI Windows installers, WiX is the usual means. All the configuration is stored in XML, and it can work with Visual Studio or as a standalone tool. It can do most everything, but it requires a fair amount of knowledge to do more complex tasks. Simple folder deployments are very straightforward, though.
  • There's a lot of other installation systems, like InstallShield or NSIS that get used a lot due to be being relatively simplistic. Most often they get deployed as executable assemblies (EXEs) instead of installers.
  • You can do fancy UI wrappers around the installers (with EXE wrappers) and some limited internal UI changes, too, but I generally wouldn't bother. There are templates that give you the standard Welcome/License/Installation Path UX.
  • Building installers from non-Windows systems can be a pain. WiX requires WINE to build on Linux due to a dependency on MSI.DLL. There's a Gnome project, MSITools, that has a partial WiX implementation but finding documentation on it is a pain, so I haven't bothered looking into it.

So what did you need the installer to actually do? And is it okay if it only builds on Windows?

Add support for executing scripts

It'd be nice if cash supported the following sort of thing:

bash $ cash filename.sh # execute filename.sh, using cash, in a separate process, and return
hello world
... # all other script output from filename.sh
bash $ # it returns back to a regular prompt (bash, zsh, cmd.exe, whatever we started from)

Support for globbing?

Just tried this out with npm install -g cash on my Ubuntu box with node 5.3. It seems pretty cool! I couldn't get any support for globbing, however. Not sure if this is a bug, or if it hasn't been implemented yet. I saw that you're using the glob module in package.json, but I was surprised that the CLI didn't offer support for it.

Grep and ls use colors by default

I noticed that cash's grep uses colored output by default. This doesn't seem to be a POSIX compliant default, however. On my Ubuntu system, if I type grep 'o' package.json, it's true that I'll see colored output, but that's because Ubuntu aliases grep by default.

You can see the actual default behavior of GNU grep if you type something like:

bash $ \grep 'o' package.json # Putting a backslash in front makes sure bash doesn't call an alias
bash $ alias grep # see what it's aliased to
alias grep='grep --color=auto'

I'm not sure if cash's default was by design (which wouldn't be the worst decision), or if it was just assumed this was the default.

I noticed the same thing with ls, which also doesn't use colors by default, it just so happens that it's commonly aliased to alias ls='ls --color=auto'.

kill jobspec shoud be pkill

GNU coreutils (whis what this emulates, not Linux) kill only kills process by pid. pkill is the POSIX command for killing processes by name (which GNU&BSD coreutils implement).

Execute inline command?

Not sure how to describe it, so subject might be incorrect.

Basically what I'm thinking is somewhat like below

> cash ls
execute ls, then exit to original shell
>

> cash cp src dest
copy...
> 

let allow invoke specific command. Is there way without installing as global viacash-global?

Replace lodash with ESX equivalents

Typically I avoid bring up the tired discussion of "you might not need underscore," but this project boasts being "written in pure ES6." That being said, when searching through some of the source code I discovered some basic usages of lodash. Curiosity got the best of me so I grepped this directory for usages of lodash and found the following unique cases

_.extend
_.filter
_.isArray
_.isObject
_.isString
_.map
_.remove
_.toArray

Usages of extend, filter, isArray, map, remove, and toArray can be replaced by built-in features of JavaScript (some much older than ES6). The others (isString and isObject) have simple, one line equivalents. Are you opposed to removing lodash and using the builtin features? If you're okay with it, I'd can submit a PR.

cash-global doesn't work in non-English operating systems

Installing cash-global won't work properly in any OS whose language isn't English. That seems to be because of the test for the "Could not find" output of the where command in the bin/preinstall.js returning false positives in other languages.
I couldn't find it in the original source code though but I certainly don't actually have a grasp of the projects bigger structure.

For example the failing output of where in my German Windows looks like this

INFORMATION: Es konnten keine Dateien mit dem angegebenen Muster gefunden werden.

I'd suggest using the npm which package instead since it's going to be included in the application anyways according to #71.

How do I change Volume on Windows ?

Say I start cash from c:\foo

Typing cd / will go to c/ which is the root of C:\ but it seems there is no way to change drive: typing cd /e to go to e:\ as in cygwin doesn't work.

Is there a way to change drive ?

Add support for -c option

Once we start actually parsing arguments, it would be good to add support for the -c option to execute a string of commands.

       -c        If the -c option is present, then commands are read from the first non-option argument command_string.  If  there  are
                 arguments after the command_string, they are assigned to the positional parameters, starting with $0.

This should probably be implemented after #51 is done, since that involves reading commandline args.

interpolation (aka command substitution)

Let's say I have a which command, I want to

$ which code
C:\Program Files (x86)\Microsoft VS Code\bin\code.cmd
$ echo "Here is your path to code: $(which code)"
Here is your path to code: C:\Program Files (x86)\Microsoft VS Code\bin\code.cmd

Add chocolately support

No ugly DLLs
Just:
npm install cash -g
cash
$

not really:

C:\Users\ik00888>npm install cash -g
Der Befehl "npm" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.

And of course in order to get npm running on a system, lots of "ugly dll's" have to be installed.

So, nice PR, but you guys can't just pretend that everyone has this stuff installed or even knows how to get there. That's ridiculous.

just my 0.02$,
Tom

cd: problems with completion

When pressing tab to complete a directory name, there are some problems with directories containing spaces: only the last part of the directory is displayed.

cashcd

It should be onmap - Copy/ but only - Copy/ appears.

Also notice how it's doesn't get the green color.

I'm using Windows (10) and Cash 3.0

streaming output

I was looking into a pull to support the yes command but it doesn't look like cash supports streaming of large output streams, one could simulate the yes command in node pretty easily with something like

function yes(explative) {
    explative = explative || 'y';
    return new stream.Readable({
        read() {
              var moreNeeded = true;
              while (moreNeaded) {
                  this.push(explative);
                  moreNeeded = this.push(os.sep);
             }
          }
    });
}

but as far as I could tell there is no way to output stuff continually async wise so that you could catch signals

cash-global installation error

When I'm trying to install cash-global, I get such an error:

C:\>npm install cash-global -g

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

C:\Users\user\AppData\Roaming\npm\node_modules\cash-global\bin\preinstall.js:26
    const excluded = (exclusions.indexOf(command) > -1);
    ^^^^^
SyntaxError: Use of const in strict mode.
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "cash-global" "-g"
npm ERR! node v0.12.10
npm ERR! npm  v2.14.9
npm ERR! code ELIFECYCLE

npm ERR! [email protected] preinstall: `node ./bin/preinstall.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] preinstall script 'node ./bin/preinstall.js'.
npm ERR! This is most likely a problem with the cash-global package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ./bin/preinstall.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls cash-global
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\npm-debug.log

Content of npm-debug.log:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files (x86)\\nodejs\\\\node.exe',
1 verbose cli   'C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install',
1 verbose cli   'cash-global',
1 verbose cli   '-g' ]
2 info using [email protected]
3 info using [email protected]
4 verbose install initial load of C:\Users\user\AppData\Roaming\npm\package.json
5 verbose readDependencies loading dependencies from C:\Users\user\AppData\Roaming\npm\package.json
6 silly cache add args [ 'cash-global', null ]
7 verbose cache add spec cash-global
8 silly cache add parsed spec { raw: 'cash-global',
8 silly cache add   scope: null,
8 silly cache add   name: 'cash-global',
8 silly cache add   rawSpec: '',
8 silly cache add   spec: '*',
8 silly cache add   type: 'range' }
9 silly addNamed cash-global@*
10 verbose addNamed "*" is a valid semver range for cash-global
11 silly addNameRange { name: 'cash-global', range: '*', hasData: false }
12 silly mapToRegistry name cash-global
13 silly mapToRegistry using default registry
14 silly mapToRegistry registry https://registry.npmjs.org/
15 silly mapToRegistry uri https://registry.npmjs.org/cash-global
16 verbose addNameRange registry:https://registry.npmjs.org/cash-global not in flight; fetching
17 verbose get https://registry.npmjs.org/cash-global not expired, no request
18 silly addNameRange number 2 { name: 'cash-global', range: '*', hasData: true }
19 silly addNameRange versions [ 'cash-global',
19 silly addNameRange   [ '0.0.2',
19 silly addNameRange     '0.0.3',
19 silly addNameRange     '0.0.4',
19 silly addNameRange     '0.0.5',
19 silly addNameRange     '0.0.6',
19 silly addNameRange     '0.0.7',
19 silly addNameRange     '0.0.8',
19 silly addNameRange     '0.0.9',
19 silly addNameRange     '0.0.10',
19 silly addNameRange     '0.0.11',
19 silly addNameRange     '0.0.12',
19 silly addNameRange     '0.0.13',
19 silly addNameRange     '0.0.14',
19 silly addNameRange     '0.0.15',
19 silly addNameRange     '0.0.16',
19 silly addNameRange     '0.0.17',
19 silly addNameRange     '0.0.18',
19 silly addNameRange     '0.1.0' ] ]
20 silly addNamed [email protected]
21 verbose addNamed "0.1.0" is a plain semver version for cash-global
22 silly cache afterAdd [email protected]
23 verbose afterAdd C:\Users\user\AppData\Roaming\npm-cache\cash-global\0.1.0\package\package.json not in flight; writing
24 verbose afterAdd C:\Users\user\AppData\Roaming\npm-cache\cash-global\0.1.0\package\package.json written
25 silly install resolved [ { name: 'cash-global',
25 silly install resolved     version: '0.1.0',
25 silly install resolved     description: 'Cross platform Linux-style commands.',
25 silly install resolved     main: './lib/index.js',
25 silly install resolved     scripts:
25 silly install resolved      { preinstall: 'node ./bin/preinstall.js',
25 silly install resolved        postinstall: 'node ./bin/postinstall.js' },
25 silly install resolved     repository:
25 silly install resolved      { type: 'git',
25 silly install resolved        url: 'git+https://github.com/cashjs/cash-global.git' },
25 silly install resolved     keywords:
25 silly install resolved      [ 'cash',
25 silly install resolved        'terminal',
25 silly install resolved        'emulator',
25 silly install resolved        'cygwin',
25 silly install resolved        'cli',
25 silly install resolved        'windows',
25 silly install resolved        'linux',
25 silly install resolved        'unix',
25 silly install resolved        'posix',
25 silly install resolved        'bash',
25 silly install resolved        'tty',
25 silly install resolved        'util',
25 silly install resolved        'vorpal',
25 silly install resolved        'vorpal.js' ],
25 silly install resolved     author: { name: 'dthree' },
25 silly install resolved     license: 'MIT',
25 silly install resolved     bugs: { url: 'https://github.com/cashjs/cash-global/issues' },
25 silly install resolved     homepage: 'https://github.com/cashjs/cash-global#readme',
25 silly install resolved     devDependencies: { gulp: '^3.9.0', 'gulp-eslint': '^1.1.1' },
25 silly install resolved     bin:
25 silly install resolved      { '$': './node_modules/cash/bin/cash.js',
25 silly install resolved        cash: './node_modules/cash/bin/cash.js' },
25 silly install resolved     dependencies: { cash: '*' },
25 silly install resolved     engines: { node: '>= 0.11.16', iojs: '>= 1.0.0' },
25 silly install resolved     files: [ 'commands.json', 'dist', 'bin' ],
25 silly install resolved     gitHead: '769b2517bfc65b8fecf6d17de6b01b14b71eb345',
25 silly install resolved     _id: '[email protected]',
25 silly install resolved     _shasum: 'c15a184fcf3c9a262cbc66ca4f63ab8509c492c0',
25 silly install resolved     _from: 'cash-global@*',
25 silly install resolved     _npmVersion: '3.3.6',
25 silly install resolved     _nodeVersion: '5.0.0',
25 silly install resolved     _npmUser: { name: 'dthree', email: '[email protected]' },
25 silly install resolved     dist:
25 silly install resolved      { shasum: 'c15a184fcf3c9a262cbc66ca4f63ab8509c492c0',
25 silly install resolved        tarball: 'http://registry.npmjs.org/cash-global/-/cash-global-0.1.0.tgz' },
25 silly install resolved     maintainers: [ [Object] ],
25 silly install resolved     _npmOperationalInternal:
25 silly install resolved      { host: 'packages-5-east.internal.npmjs.com',
25 silly install resolved        tmp: 'tmp/cash-global-0.1.0.tgz_1456026581272_0.7278439523652196' },
25 silly install resolved     directories: {},
25 silly install resolved     _resolved: 'https://registry.npmjs.org/cash-global/-/cash-global-0.1.0.tgz',
25 silly install resolved     readme: 'ERROR: No README data found!' } ]
26 info install [email protected] into C:\Users\user\AppData\Roaming\npm
27 info installOne [email protected]
28 verbose installOne of cash-global to C:\Users\user\AppData\Roaming\npm not in flight; installing
29 verbose lock using C:\Users\user\AppData\Roaming\npm-cache\_locks\cash-global-c09d7c9a277aab3c.lock for C:\Users\user\AppData\Roaming\npm\node_modules\cash-global
30 silly install write writing cash-global 0.1.0 to C:\Users\user\AppData\Roaming\npm\node_modules\cash-global
31 verbose unbuild node_modules\cash-global
32 silly gentlyRm C:\Users\user\AppData\Roaming\npm\node_modules\cash-global is being purged from base C:\Users\user\AppData\Roaming\npm
33 verbose gentlyRm don't care about contents; nuking C:\Users\user\AppData\Roaming\npm\node_modules\cash-global
34 verbose tar unpack C:\Users\user\AppData\Roaming\npm-cache\cash-global\0.1.0\package.tgz
35 verbose tar unpacking to C:\Users\user\AppData\Roaming\npm\node_modules\cash-global
36 silly gentlyRm C:\Users\user\AppData\Roaming\npm\node_modules\cash-global is being purged
37 verbose gentlyRm don't care about contents; nuking C:\Users\user\AppData\Roaming\npm\node_modules\cash-global
38 silly gunzTarPerm modes [ '777', '666' ]
39 silly gunzTarPerm extractEntry package.json
40 silly gunzTarPerm modified mode [ 'package.json', 436, 438 ]
41 silly gunzTarPerm extractEntry README.md
42 silly gunzTarPerm modified mode [ 'README.md', 484, 502 ]
43 silly gunzTarPerm extractEntry bin/alias.js
44 silly gunzTarPerm modified mode [ 'bin/alias.js', 436, 438 ]
45 silly gunzTarPerm extractEntry bin/grep.js
46 silly gunzTarPerm modified mode [ 'bin/grep.js', 436, 438 ]
47 silly gunzTarPerm extractEntry bin/kill.js
48 silly gunzTarPerm modified mode [ 'bin/kill.js', 436, 438 ]
49 silly gunzTarPerm extractEntry bin/less.js
50 silly gunzTarPerm modified mode [ 'bin/less.js', 436, 438 ]
51 silly gunzTarPerm extractEntry bin/ls.js
52 silly gunzTarPerm modified mode [ 'bin/ls.js', 436, 438 ]
53 silly gunzTarPerm extractEntry bin/echo.js
54 silly gunzTarPerm modified mode [ 'bin/echo.js', 436, 438 ]
55 silly gunzTarPerm extractEntry bin/mv.js
56 silly gunzTarPerm modified mode [ 'bin/mv.js', 436, 438 ]
57 silly gunzTarPerm extractEntry bin/parser.js
58 silly gunzTarPerm modified mode [ 'bin/parser.js', 484, 502 ]
59 silly gunzTarPerm extractEntry bin/postinstall.js
60 silly gunzTarPerm modified mode [ 'bin/postinstall.js', 484, 502 ]
61 silly gunzTarPerm extractEntry bin/preinstall.js
62 silly gunzTarPerm modified mode [ 'bin/preinstall.js', 484, 502 ]
63 silly gunzTarPerm extractEntry bin/pwd.js
64 silly gunzTarPerm modified mode [ 'bin/pwd.js', 436, 438 ]
65 silly gunzTarPerm extractEntry bin/cp.js
66 silly gunzTarPerm modified mode [ 'bin/cp.js', 436, 438 ]
67 silly gunzTarPerm extractEntry bin/touch.js
68 silly gunzTarPerm modified mode [ 'bin/touch.js', 436, 438 ]
69 silly gunzTarPerm extractEntry bin/cd.js
70 silly gunzTarPerm modified mode [ 'bin/cd.js', 436, 438 ]
71 silly gunzTarPerm extractEntry bin/rm.js
72 silly gunzTarPerm modified mode [ 'bin/rm.js', 436, 438 ]
73 silly gunzTarPerm extractEntry bin/cat.js
74 silly gunzTarPerm modified mode [ 'bin/cat.js', 436, 438 ]
75 silly gunzTarPerm extractEntry bin/sort.js
76 silly gunzTarPerm modified mode [ 'bin/sort.js', 436, 438 ]
77 silly gunzTarPerm extractEntry bin/cash.js
78 silly gunzTarPerm modified mode [ 'bin/cash.js', 484, 502 ]
79 silly gunzTarPerm extractEntry bin/unalias.js
80 silly gunzTarPerm modified mode [ 'bin/unalias.js', 436, 438 ]
81 silly gunzTarPerm extractEntry bin/mkdir.js
82 silly gunzTarPerm modified mode [ 'bin/mkdir.js', 436, 438 ]
83 silly gunzTarPerm extractEntry bin/rebuilt.json
84 silly gunzTarPerm modified mode [ 'bin/rebuilt.json', 436, 438 ]
85 silly gunzTarPerm extractEntry commands.json
86 silly gunzTarPerm modified mode [ 'commands.json', 484, 502 ]
87 silly gunzTarPerm extractEntry dist/mute.js
88 silly gunzTarPerm modified mode [ 'dist/mute.js', 484, 502 ]
89 verbose write writing to C:\Users\user\AppData\Roaming\npm\node_modules\cash-global\package.json
90 info preinstall [email protected]
91 verbose unsafe-perm in lifecycle true
92 info [email protected] Failed to exec preinstall script
93 verbose unlock done using C:\Users\user\AppData\Roaming\npm-cache\_locks\cash-global-c09d7c9a277aab3c.lock for C:\Users\user\AppData\Roaming\npm\node_modules\cash-global
94 verbose stack Error: [email protected] preinstall: `node ./bin/preinstall.js`
94 verbose stack Exit status 1
94 verbose stack     at EventEmitter.<anonymous> (C:\Program Files (x86)\nodejs\node_modules\npm\lib\utils\lifecycle.js:214:16)
94 verbose stack     at EventEmitter.emit (events.js:110:17)
94 verbose stack     at ChildProcess.<anonymous> (C:\Program Files (x86)\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
94 verbose stack     at ChildProcess.emit (events.js:110:17)
94 verbose stack     at maybeClose (child_process.js:1016:16)
94 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1088:5)
95 verbose pkgid [email protected]
96 verbose cwd C:\
97 error Windows_NT 6.1.7601
98 error argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "cash-global" "-g"
99 error node v0.12.10
100 error npm  v2.14.9
101 error code ELIFECYCLE
102 error [email protected] preinstall: `node ./bin/preinstall.js`
102 error Exit status 1
103 error Failed at the [email protected] preinstall script 'node ./bin/preinstall.js'.
103 error This is most likely a problem with the cash-global package,
103 error not with npm itself.
103 error Tell the author that this fails on your system:
103 error     node ./bin/preinstall.js
103 error You can get their info via:
103 error     npm owner ls cash-global
103 error There is likely additional logging output above.
104 verbose exit [ 1, true ]
105 verbose unbuild node_modules\cash-global
106 info preuninstall [email protected]
107 info uninstall [email protected]
108 verbose unbuild rmStuff [email protected] from C:\Users\user\AppData\Roaming\npm\node_modules
109 silly gentlyRm C:\Users\user\AppData\Roaming\npm\$.cmd is being gently removed
110 silly gentlyRm verifying C:\Users\user\AppData\Roaming\npm is an npm working directory
111 silly gentlyRm C:\Users\user\AppData\Roaming\npm\cash.cmd is being gently removed
112 silly gentlyRm verifying C:\Users\user\AppData\Roaming\npm is an npm working directory
113 silly gentlyRm containing path C:\Users\user\AppData\Roaming\npm is under npm's control, in C:\Users\user\AppData\Roaming\npm
114 silly gentlyRm deletion target C:\Users\user\AppData\Roaming\npm\$.cmd is under C:\Users\user\AppData\Roaming\npm
115 verbose gentlyRm vacuuming from C:\Users\user\AppData\Roaming\npm\$.cmd up to C:\Users\user\AppData\Roaming\npm
116 silly gentlyRm containing path C:\Users\user\AppData\Roaming\npm is under npm's control, in C:\Users\user\AppData\Roaming\npm
117 silly gentlyRm deletion target C:\Users\user\AppData\Roaming\npm\cash.cmd is under C:\Users\user\AppData\Roaming\npm
118 verbose gentlyRm vacuuming from C:\Users\user\AppData\Roaming\npm\cash.cmd up to C:\Users\user\AppData\Roaming\npm
119 silly gentlyRm C:\Users\user\AppData\Roaming\npm\$ is being gently removed
120 silly gentlyRm verifying C:\Users\user\AppData\Roaming\npm is an npm working directory
121 silly gentlyRm containing path C:\Users\user\AppData\Roaming\npm is under npm's control, in C:\Users\user\AppData\Roaming\npm
122 silly gentlyRm deletion target C:\Users\user\AppData\Roaming\npm\$ is under C:\Users\user\AppData\Roaming\npm
123 verbose gentlyRm vacuuming from C:\Users\user\AppData\Roaming\npm\$ up to C:\Users\user\AppData\Roaming\npm
124 silly gentlyRm C:\Users\user\AppData\Roaming\npm\cash is being gently removed
125 silly gentlyRm verifying C:\Users\user\AppData\Roaming\npm is an npm working directory
126 silly gentlyRm containing path C:\Users\user\AppData\Roaming\npm is under npm's control, in C:\Users\user\AppData\Roaming\npm
127 silly gentlyRm deletion target C:\Users\user\AppData\Roaming\npm\cash is under C:\Users\user\AppData\Roaming\npm
128 verbose gentlyRm vacuuming from C:\Users\user\AppData\Roaming\npm\cash up to C:\Users\user\AppData\Roaming\npm
129 info postuninstall [email protected]
130 silly gentlyRm C:\Users\user\AppData\Roaming\npm\node_modules\cash-global is being purged from base C:\Users\user\AppData\Roaming\npm
131 verbose gentlyRm don't care about contents; nuking C:\Users\user\AppData\Roaming\npm\node_modules\cash-global
132 silly vacuum-fs purging C:\Users\user\AppData\Roaming\npm\node_modules\cash-global
133 silly vacuum-fs quitting because other entries in C:\Users\user\AppData\Roaming\npm\node_modules

Do you know what is the problem?

Trying to open vim hangs cash

When I type $ vim or $ vim filename, the shell hangs for a few seconds then the window title changes to [NO NAME] - VIM or filename - VIM but vim doesn't open and I can't enter anything into the shell, ctrl+c does nothing. Have I done something wrong or is there an issue here? Possibly related to the node modules hanging to?

How to show environment variables - bug?

Hi,
I can't get cash to show Environment variables in cmd.exe or powershell when I use echo.

cmd.exe:

echo %ORACLE_HOME%
e:\oracle\product\11.2.0\client_1
cash
me@myserver:I/$ echo $ORACLE_HOME
$ORACLE_HOME
me@myserver:I/$ echo %ORACLE_HOME%
%ORACLE_HOME%

powershell (similar results to above)

Cheers,
Stuart.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.