akamai / cli-sandbox

Akamai CLI for Sandbox
https://github.com/akamai/cli
Apache License 2.0
13 stars 12 forks source link

Faced an error -> Cannot find module './bin/cli-main.js' #76

Closed elfinston closed 3 years ago

elfinston commented 3 years ago

Hi Team,

I faced an issue below at start of test for sandbox CLI.

[root@localhost ~]# java -version
openjdk version "11.0.9.1" 2020-11-04 LTS
OpenJDK Runtime Environment 18.9 (build 11.0.9.1+1-LTS)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.9.1+1-LTS, mixed mode, sharing)

[root@localhost ~]# node -v
v12.20.1

[root@localhost ~]# akamai sandbox
internal/modules/cjs/loader.js:818
  throw err;
  ^

Error: Cannot find module './bin/cli-main.js'
Require stack:
- /root/.akamai-cli/src/cli-sandbox/akamai-sandbox
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
    at Function.Module._load (internal/modules/cjs/loader.js:667:27)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/root/.akamai-cli/src/cli-sandbox/akamai-sandbox:3:1)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/root/.akamai-cli/src/cli-sandbox/akamai-sandbox' ]

Please let me know how can I fix this? When I tried a common user account rather than 'root', It worked well.

Here is my environment.

Regards, Shane

elfinston commented 3 years ago

It worked with a common username rather than 'root'