Cli: Error [ERR_REQUIRE_ESM] with `netlify link`

Created on 28 Apr 2020  ยท  7Comments  ยท  Source: netlify/cli

- Do you want to request a _feature_ or report a _bug_?
Bug

- What is the current behavior?
netlify link with a fresh CLI install returns Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /usr/local/lib/node_modules/netlify-cli/node_modules/is-promise/index.js require() of ES modules is not supported.

- If the current behavior is a bug, please provide the steps to reproduce.

  1. npm install netlify-cli -g
  2. netlify link

- Local Environment Information

  • MacOS
  • v12.16.2

Related

% netlify -v
netlify-cli/2.48.0 darwin-x64 node-v12.16.2
bug

All 7 comments

Oh oh oh @RaeesBhatti , that might be related to the great 2020 is-promise one-line-of-code disaster that broke many npm modules: https://medium.com/javascript-in-plain-english/is-promise-post-mortem-cab807f18dcc

[email protected] /home/ether/netlify/cli
โ”œโ”€โ”ฌ [email protected]
โ”‚ โ””โ”€โ”€ [email protected] 
โ”œโ”€โ”ฌ [email protected]
โ”‚ โ””โ”€โ”ฌ [email protected]
โ”‚   โ””โ”€โ”€ [email protected]  deduped
โ””โ”€โ”ฌ [email protected]
  โ””โ”€โ”ฌ [email protected]
    โ””โ”€โ”€ [email protected]  deduped

I tried reinstalling as suggested in #863, but it's still caught up on the bad version.

Okay, I got it to work by running:

$ brew uninstall netlify-cli
Uninstalling /usr/local/Cellar/netlify-cli/2.48.0... (16,459 files, 153.0MB)

$ brew install -s netlify-cli
โ€ฆ

I think there should still be a new version pushed to Homebrew so that this is not necessary.

Is this still a problem? I haven't been able to reproduce it recently.

@kaganjd Can you please provide an update on whether this is still a problem!

Hey @RaeesBhatti, I haven't heard anything in response from the person who wrote into Community

Was this page helpful?
0 / 5 - 0 ratings