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
Uncaught TypeError: createRequire is not a function #8047
Comments
Sounds like a Node version problem. Prettier requires Node 10.13.0+. |
I'm seeing a similar issue.. Environments:
Steps to reproduce:
Result
Expected
I can also create a new issue if need be.. |
Also seen this when tried to run prettier through Jetbrains IDEA plugin. Environments:
Here is the output:
|
@NazarkinRoman You shouldn't need the plugin to use Prettier in WebStorm 2020.1. See https://prettier.io/docs/en/webstorm.html |
My tests are failing too with this error: https://travis-ci.org/github/matepek/vscode-catch2-test-adapter/jobs/675884929 |
@matepek Your tests use |
@fisker Seems like it's easier to a add a fallback to https://www.npmjs.com/package/resolve than to fight all these hacks. Thoughts? |
I downgraded to:
It seems working. |
Let's do it, we don't want waste more time on this. Edit: Sorry, I didn't read carefully, I thought you want remove use |
This plugin was installed for long time ago so I just didn't realized that WebStorm now has native support for it. But it seems that they simply replaced old plugin with their own bundled when I updated to the latest version so the bug is still actual. |
I'm going to release 2.0.5 this weekend. It will include a fix for these problems (#8072). |
@NazarkinRoman 2.0.5 is out. Please update and check if the issue is gone. |
Thanks all, looks like that solved the issue 🎉 |
@thorn0 it looks like the previous error has gone, but another one appeared while using Prettier with WebStorm:
|
@NazarkinRoman Does this happen always or only when formatting some specific piece of code? Does downgrading to 2.0.2 fix this? |
@thorn0 Hmm. Right now tried to run it again and it worked (for both cases: whole document and range). I'll get back to you if this error will appear again. |
2.0.5 (with eslint-prettier 3.1.4) did not solve the problem for me (Atom 1.44) |
ESLint/Prettier requirement changes? prettier/prettier#8047
I decided to do an update to borales/actions-yarn/@v2.3.0 |
Environments:
Steps to reproduce:
Please see prettier/prettier-atom#725
Thanks!
The text was updated successfully, but these errors were encountered: