electrode-io / xarc-run

npm run scripts concurrently and serially, and more.
Apache License 2.0
42 stars 9 forks source link

Simple example isn't working #2

Closed jwhitmarsh closed 7 years ago

jwhitmarsh commented 7 years ago

I've created an xclap.js with the contents:

const xclap = require(`xclap`);
const tasks = {
  hello: `echo hello world`,
  js: () => console.log(`JS hello world`),
  both: {
    desc: `invoke tasks hello and js in serial order`,
    task: [`hello`, `js`]
  }
};
xclap.load(tasks);

And this is the output:

➜ clap -f
[15:26:44] xclap version 0.2.12 at /Users/jwhitmarsh/.npm-packages/lib/node_modules/xclap
[15:26:44] NodeJS version v8.3.0 at /usr/local/bin/node
[15:26:44] CWD is /Users/jwhitmarsh/src/test-proj
[15:26:44] Loaded CWD/xclap.js
[15:26:44] No tasks found - please load some.

Usage: clap [options] [--] [task1 [task options] task2 [task options] ...]
 Help: clap -h  Example: clap build
jchip commented 7 years ago

It seems you've done npm install -g xclap.

You should only install xclap locally.

To get the clap command globally, install the xclap-cli package.

npm install -g xclap-cli

jwhitmarsh commented 7 years ago

Ah apologies. Thanks very much.

farehakaukab commented 4 years ago

i did this npm install -g xclap-cli and did not install xclap locally and i still see the same error when i run clap build [15:26:44] Loaded CWD/xclap.js [15:26:44] No tasks found - please load some.

Usage: clap [options] [--] [task1 [task options] task2 [task options] ...] Help: clap -h Example: clap build

I even have tasks in xclap.js and it was working a while ago and now suddenly this is throwing me these errors. Also tried git clean -fxd and npm i but still same