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

Error [ERR_REQUIRE_ESM] with netlify link #868

Closed
kaganjd opened this issue Apr 28, 2020 · 7 comments
Closed

Error [ERR_REQUIRE_ESM] with netlify link #868

kaganjd opened this issue Apr 28, 2020 · 7 comments
Assignees
Labels
type: bug code to address defects in shipped code

Comments

@kaganjd
Copy link

kaganjd commented Apr 28, 2020

- 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
@ehmicky
Copy link
Contributor

ehmicky commented Apr 28, 2020

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

netlify-cli@2.48.0 /home/ether/netlify/cli
├─┬ ava@1.4.1
│ └── is-promise@2.1.0 
├─┬ inquirer@6.5.2
│ └─┬ run-async@2.4.0
│   └── is-promise@2.1.0  deduped
└─┬ lint-staged@9.5.0
  └─┬ listr@0.14.3
    └── is-promise@2.1.0  deduped

@TomPichaud
Copy link

#863

@earthboundkid
Copy link

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

@earthboundkid
Copy link

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.

@fool fool added the type: bug code to address defects in shipped code label Apr 30, 2020
@RaeesBhatti
Copy link
Contributor

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

@RaeesBhatti RaeesBhatti self-assigned this May 5, 2020
@RaeesBhatti
Copy link
Contributor

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

@kaganjd
Copy link
Author

kaganjd commented May 6, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

No branches or pull requests

7 participants