matano icon indicating copy to clipboard operation
matano copied to clipboard

"make install" does not install the Matano CLI independent of its source code

Open niheconomoum opened this issue 1 year ago • 1 comments

I am running Ubuntu 20.04 on Windows via WSL 1.

I have installed node.js v12.22.12 via the Node Version Manager per https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-20-04.

After installing the Matano CLI per https://www.matano.dev/docs/installation, I cannot remove my copy of the source code without breaking the installation of the Matano CLI:

xenophonf@l0000000d:~/src$ git clone https://github.com/matanolabs/matano.git
Cloning into 'matano'...
remote: Enumerating objects: 4324, done.
remote: Counting objects: 100% (1119/1119), done.
remote: Compressing objects: 100% (518/518), done.
remote: Total 4324 (delta 618), reused 931 (delta 488), pack-reused 3205
Receiving objects: 100% (4324/4324), 7.21 MiB | 967.00 KiB/s, done.
Resolving deltas: 100% (2203/2203), done.
xenophonf@l0000000d:~/src$ cd matano && make install
cd infra && npm run clean && npm ci && npm run build

> [email protected] clean /home/xenophonf/src/matano/infra
> rm -rf dist && rm -rf node_modules

added 598 packages in 14.224s

> [email protected] build /home/xenophonf/src/matano/infra
> rm -rf dist && tsc

cd cli && npm run clean && npm run full-install

> [email protected] clean /home/xenophonf/src/matano/cli
> rm -rf dist && rm -rf node_modules


> [email protected] full-install /home/xenophonf/src/matano/cli
> npm ci && npm run build && npm uninstall -g matano && npm install -g .


> [email protected] preinstall /home/xenophonf/src/matano/cli/node_modules/yarn
> :; (node ./preinstall.js > /dev/null 2>&1 || true)

added 632 packages in 21.89s

> [email protected] build /home/xenophonf/src/matano/cli
> rm -rf dist && tsc -b

removed 1 package in 2.042s
/home/xenophonf/.nvm/versions/node/v12.22.12/bin/matano -> /home/xenophonf/.nvm/versions/node/v12.22.12/lib/node_modules/matano/bin/run
+ [email protected]
added 1 package from 1 contributor in 0.833s
xenophonf@l0000000d:~/src/matano$ which matano
/home/xenophonf/.nvm/versions/node/v12.22.12/bin/matano
xenophonf@l0000000d:~/src/matano$ matano --help
(node:24394) SyntaxError Plugin: matano: Unexpected token '.'
module: @oclif/[email protected]
task: toCached
plugin: matano
root: /home/xenophonf/src/matano/cli
See more details with DEBUG=*
(node:24394) SyntaxError Plugin: matano: Unexpected token '.'
module: @oclif/[email protected]
task: toCached
plugin: matano
root: /home/xenophonf/src/matano/cli
See more details with DEBUG=*
(node:24394) SyntaxError Plugin: matano: Unexpected token '?'
module: @oclif/[email protected]
task: toCached
plugin: matano
root: /home/xenophonf/src/matano/cli
See more details with DEBUG=*
█▀▄▀█ ▄▀█ ▀█▀ ▄▀█ █▄░█ █▀█
█░▀░█ █▀█ ░█░ █▀█ █░▀█ █▄█

Matano - the open source security lake platform for AWS.

VERSION
  matano/0.0.0 wsl-x64 node-v12.22.12

USAGE
  $ matano [COMMAND]

TOPICS
  generate  Utilities to get started and generate boilerplate.

COMMANDS
  autocomplete  display autocomplete installation instructions
  help          Display help for matano.

xenophonf@l0000000d:~/src/matano$ cd ..
xenophonf@l0000000d:~/src$ rm -rf matano
xenophonf@l0000000d:~/src$ which matano
xenophonf@l0000000d:~/src$ ls -l /home/xenophonf/.nvm/versions/node/v12.22.12/bin/matano
lrwxrwxrwx 1 xenophonf xenophonf 34 Aug 12 11:00 /home/xenophonf/.nvm/versions/node/v12.22.12/bin/matano -> ../lib/node_modules/matano/bin/run
xenophonf@l0000000d:~/src$ ls -l /home/xenophonf/.nvm/versions/node/v12.22.12/bin/../lib/node_modules/matano/bin/run
ls: cannot access '/home/xenophonf/.nvm/versions/node/v12.22.12/bin/../lib/node_modules/matano/bin/run': No such file or directory
xenophonf@l0000000d:~/src$ ls -l /home/xenophonf/.nvm/versions/node/v12.22.12/bin/../lib/node_modules/
total 0
lrwxrwxrwx 1 xenophonf xenophonf   32 Aug 12 11:00 matano -> ../../../../../../src/matano/cli
drwx------ 1 xenophonf xenophonf 4096 Apr  5 03:11 npm

niheconomoum avatar Aug 12 '22 15:08 niheconomoum

Yes, we don't currently provide binaries or a packaged version of the CLI, and recommend running using the source code.

This is something we aim to add.

Samrose-Ahmed avatar Aug 12 '22 15:08 Samrose-Ahmed

We now provide prebuilt binaries through a GitHub Release without a Node/NPM dependency. View the installation instructions here.

Samrose-Ahmed avatar Aug 31 '22 11:08 Samrose-Ahmed