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

zsh: command not found: trash #42

Closed
zulhfreelancer opened this issue Nov 8, 2015 · 7 comments
Closed

zsh: command not found: trash #42

zulhfreelancer opened this issue Nov 8, 2015 · 7 comments

Comments

@zulhfreelancer
Copy link

I just installed trash and I'm using ZSH. I get zsh: command not found: trash error.

$ trash a.txt
zsh: command not found: trash

$ npm list --depth=0
/Users/zulhilmizainudin
├── empty-trash@2.0.0
└── trash@3.2.0

$ npm -v
2.6.1

What should I do?

@sindresorhus
Copy link
Owner

What should I do?

Read the docs and install the correct package: https://github.com/sindresorhus/trash#cli

@zulhfreelancer
Copy link
Author

I get another error.

$ cd Desktop

$ touch a.txt

$ npm install --global trash-cli
npm WARN engine trash-cli@1.2.0: wanted: {"node":">=4"} (current: {"node":"0.12.0","npm":"2.6.1"})
/usr/local/bin/trash -> /usr/local/lib/node_modules/trash-cli/cli.js
trash-cli@1.2.0 /usr/local/lib/node_modules/trash-cli
├── meow@3.5.0 (loud-rejection@1.0.0, trim-newlines@1.0.0, object-assign@4.0.1, minimist@1.2.0, camelcase-keys@1.0.0, redent@1.0.0, normalize-package-data@2.3.5, read-pkg-up@1.0.1)
├── trash@3.2.0 (escape-string-applescript@1.0.0, run-applescript@2.0.0, path-exists@2.0.0, pify@2.3.0, uuid@2.0.1, pinkie-promise@1.0.0, xdg-trashdir@2.0.0, globby@3.0.1, fs-extra@0.24.0)
└── update-notifier@0.5.0 (is-npm@1.0.0, semver-diff@2.0.0, string-length@1.0.1, chalk@1.1.1, repeating@1.1.3, configstore@1.3.0, latest-version@1.0.1)

$ trash a.txt
/usr/local/lib/node_modules/trash-cli/cli.js:3
const updateNotifier = require('update-notifier');
^^^^^
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

@sindresorhus
Copy link
Owner

Your answer is right in the error message:

wanted: {"node":">=4"}

You need to upgrade your Node.js version.

Repository owner locked and limited conversation to collaborators Nov 8, 2015
@arthurvr
Copy link
Contributor

arthurvr commented Nov 8, 2015

Please read the error carefully:

npm WARN engine trash-cli@1.2.0: wanted: {"node":">=4"} (current: {"node":"0.12.0","npm":"2.6.1"})

@arthurvr
Copy link
Contributor

arthurvr commented Nov 8, 2015

... and Sindre was quicker :p

@sindresorhus
Copy link
Owner

lol

@sindresorhus
Copy link
Owner

too slo'w bro

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

No branches or pull requests

3 participants