Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

akamai netstorage command fails in macOS - Error [ERR_REQUIRE_ESM]: require() of ES Module #31

Open
darthega opened this issue Jun 20, 2023 · 3 comments

Comments

@darthega
Copy link

This is a weird case I haven't found any reference to:

We have an Azure pipeline that installs akamai cli via brew in a MacOS VM, then uses akamai install to get netstorage, all the installation process succeeds, but when executing any akamai netstorage command, the CLI returns a JS error:

/Users/<user-name>/.akamai-cli/src/cli-netstorage/bin/akamaiNetstorage:26
let untildify = require('untildify');
                ^

Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/<user-name>/.akamai-cli/src/cli-netstorage/node_modules/untildify/index.js from /Users/<user-name>/.akamai-cli/src/cli-netstorage/bin/akamaiNetstorage not supported.

I've tried several different versions of MacOS with and all reproduce the same issue, I'm also able to reproduce it locally after installing akamai cli via brew [ref] and also via binary file download [ref].

I've also tried different nodejs versions using nvm to no avail.

Further more, around 6 months ago (last time this pipeline was executed) it succeeded, my assumption is that something changed inside the netstorage package, most likely their dependency version for untildify, and it is breaking the execution.

Steps to reproduce

  • On Mac OS
  • Install akamai-cli via brew or binary file
  • Run akamai install netstorage
  • Attempt to run akamai netstorage --help

Screenshots
Azure execution:
Screenshot 2023-06-20 at 10 44 34

Local execution:
Screenshot 2023-06-20 at 10 46 44

@darthega
Copy link
Author

I just found this PR that might be related: #30

@femueller
Copy link

+1

@anikitin
Copy link

anikitin commented Sep 8, 2023

Please fix it, it took me a couple of hours today in attempts to work around this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants