When cli-sandbox is installed, apparently the CLI doesn't run build command which results in broken cli and the following error:
~ # akamai sandbox
module.js:550
throw err;
^
Error: Cannot find module './bin/cli-main.js'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/cli/.akamai-cli/src/cli-sandbox/akamai-sandbox:3:1)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
Steps to reproduce:
$ docker run -it -P --name test1 alpine
~ # export AKAMAI_CLI_HOME=/cli
~ # export GOROOT=/usr/lib/go
~ # export GOPATH=/go
~ # mkdir -p /cli/.akamai-cli
~ # apk add --no-cache docker git bash python2 python2-dev py2-pip python3 python3-dev npm wget jq openssl openssl-dev curl nodejs build-base libffi libffi-dev vim nano util-linux go dep tree bind-tools
~ # apk add openjdk8 libc6-compat
~ # go get github.com/akamai/cli && cd $GOPATH/src/github.com/akamai/cli && dep ensure && go build -o /usr/local/bin/akamai
~ # akamai install sandbox
~ # akamai sandbox
module.js:550
throw err;
^
Error: Cannot find module './bin/cli-main.js'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/cli/.akamai-cli/src/cli-sandbox/akamai-sandbox:3:1)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
Can be easily fixed:
~ # cd $AKAMAI_CLI_HOME/.akamai-cli/src/cli-sandbox/
/cli/.akamai-cli/src/cli-sandbox # npm run build
~ # akamai sandbox
Usage: [options] [command]
A tool to help manage Akamai Sandboxes. Uses the sandbox {OPEN} API.
...
When
cli-sandbox
is installed, apparently the CLI doesn't run build command which results in broken cli and the following error:Steps to reproduce:
Can be easily fixed: