box / boxcli

A command line interface for interacting with the Box API.
https://developer.box.com
Apache License 2.0
228 stars 59 forks source link

Providing support for the executable binary file for Ubuntu and other Linux distros? #410

Closed chenle02 closed 2 years ago

chenle02 commented 2 years ago

Dear Box Team,

Thanks for your great work~!

Is your feature request related to a problem? Please describe.

I try to use Box CLI on my Ubuntu 20.04 but failed to install it.

In my system, I have a node version v16.17.1. While I tried to install via sudo npm install --global @box/cli , it failed with the following error messages:

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@box/cli@3.4.0',
npm WARN EBADENGINE   required: { node: '>=12.0.0 <15.0.0' },
npm WARN EBADENGINE   current: { node: 'v16.17.1', npm: '8.15.0' }
npm WARN EBADENGINE }
npm ERR! code 1
npm ERR! path /usr/lib/node_modules/@box/cli/node_modules/keytar
npm ERR! command failed
npm ERR! command sh /tmp/install-d2c79301.sh
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.0.0have a node version v16.17.1. While trying to install npm
npm ERR! gyp info using node@16.17.1 | linux | x64
npm ERR! gyp info find Python using Python version 3.10.6 found at "/usr/local/bin/python3"
npm ERR! gyp info spawn /usr/local/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/lib/node_modules/@box/cli/node_modules/keytar/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/root/.cache/node-gyp/16.17.1/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/root/.cache/node-gyp/16.17.1',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/root/.cache/node-gyp/16.17.1/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/usr/lib/node_modules/@box/cli/node_modules/keytar',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! Package libsecret-1 was not found in the pkg-config search path.
npm ERR! Perhaps you should add the directory containing `libsecret-1.pc'
npm ERR! to the PKG_CONFIG_PATH envirould be great if an executable binary file coould be great if an executable binary file coonment variable
npm ERR! No package 'libsecret-1' found
npm ERR! gyp: Call to 'pkg-config --cflags libsecret-1' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:261:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Linux 5.15.0-46-generic
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /usr/lib/node_modules/@box/cli/node_modules/keytar
npm ERR! gyp ERR! node -v v16.17.1
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-09-28T13_51_34_322Z-debug-0.log

Describe the solution you'd like

Describe alternatives you've considered

chenle02 commented 2 years ago

Sorry that, I have resolved my issue by install libsecret-1-dev

arjankowski commented 2 years ago

Hi @chenle02 ,

That's great, So now you are able to install boxcli via npm, right?

arjankowski commented 2 years ago

Closing as there is no more issue