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

Parsing error on Windows #389

Closed
4 tasks done
r-hede opened this issue May 6, 2022 · 10 comments · Fixed by #392
Closed
4 tasks done

Parsing error on Windows #389

r-hede opened this issue May 6, 2022 · 10 comments · Fixed by #392

Comments

@r-hede
Copy link

r-hede commented May 6, 2022

Initial checklist

Affected packages and versions

2.0.0-next.2

Link to runnable example

No response

Steps to reproduce

  1. npm init && npm i eslint eslint-plugin-mdx@next
  2. Configure the ESLint config file for eslint >= 6.4.0:
{
  "extends": ["plugin:mdx/recommended"],
  // optional, if you want to lint code blocks at the same time
  "settings": {
    "mdx/code-blocks": true,
    // optional, if you want to disable language mapper, set it to `false`
    // if you want to override the default language mapper inside, you can provide your own
    "mdx/language-mapper": {}
  }
}
  1. Make sure ESLint knows to run on .md or .mdx files:
    "scripts": { "eslint": "eslint . --ext js,md,mdx" },
  2. Add mdx file without any error to the app.

Expected behavior

No error

Actual behavior

0:0 error Parsing error: Only file and data URLs are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'

Runtime

Node v16

Package manager

npm v8

OS

Windows

Build and bundle tools

No response

@JounQin
Copy link
Member

JounQin commented May 6, 2022

Please provide reproduction...

@r-hede
Copy link
Author

r-hede commented May 6, 2022

Please provide reproduction...

I can't send you a reproduction on codesandbox or stackblitz because you have to be on a Windows environment to reproduce the error.

Here is the files : https://github.com/r-hede/eslint-mdx-parsing-error-on-windows

@JounQin
Copy link
Member

JounQin commented May 7, 2022

@r-hede Can you add GitHub Actions with Windows? I don't have Windows machine.

@JounQin
Copy link
Member

JounQin commented May 7, 2022

This could be an issue from synckit, I'll take a look.

JounQin added a commit to un-ts/synckit that referenced this issue May 7, 2022
JounQin added a commit to un-ts/synckit that referenced this issue May 7, 2022
JounQin added a commit to un-ts/synckit that referenced this issue May 7, 2022
@JounQin
Copy link
Member

JounQin commented May 7, 2022

@r-hede

# yarn 1
yarn add https://pkg.csb.dev/rx-ts/synckit/commit/75d177a6/synckit
# yarn 2, 3
yarn add synckit@https://pkg.csb.dev/rx-ts/synckit/commit/75d177a6/synckit/_pkg.tgz
# npm
npm i https://pkg.csb.dev/rx-ts/synckit/commit/75d177a6/synckit

Can you try a new version of synckit?

@JounQin
Copy link
Member

JounQin commented May 8, 2022

@r-hede

Please try

# yarn 1
yarn add https://pkg.csb.dev/mdx-js/eslint-mdx/commit/2bc2a3fa/eslint-mdx https://pkg.csb.dev/mdx-js/eslint-mdx/commit/2bc2a3fa/eslint-plugin-mdx
# yarn 2, 3
yarn add eslint-mdx@https://pkg.csb.dev/mdx-js/eslint-mdx/commit/2bc2a3fa/eslint-mdx/_pkg.tgz eslint-plugin-mdx@https://pkg.csb.dev/mdx-js/eslint-mdx/commit/2bc2a3fa/eslint-plugin-mdx/_pkg.tgz
# npm
npm i https://pkg.csb.dev/mdx-js/eslint-mdx/commit/2bc2a3fa/eslint-mdx https://pkg.csb.dev/mdx-js/eslint-mdx/commit/2bc2a3fa/eslint-plugin-mdx

It should work now, I've tested on a Windows VM.

@r-hede
Copy link
Author

r-hede commented May 13, 2022

Sorry for the delay, I was also able to test on Windows and I confirm that it works correctly.

Do you plan to release a new version including this fix?

@JounQin
Copy link
Member

JounQin commented May 13, 2022

@wooorm A new next version is ready.

@wooorm
Copy link
Member

wooorm commented May 14, 2022

Now? Or do you first want to land the other PR?

@JounQin
Copy link
Member

JounQin commented May 14, 2022

Now? Or do you first want to land the other PR?

Let's wait for the other PR.

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

Successfully merging a pull request may close this issue.

3 participants