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

fix: invalid ESM module path on Windows #7162

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

ChenPi11
Copy link

Fixes #7089

On Windows, ESM loader only accept a valid file:// URLs when it's a absolute path.
So add file:// prefix and replace \ to '/' to make it a valid URL.

@ChenPi11 ChenPi11 requested a review from a team as a code owner January 11, 2025 04:41
Copy link

codecov bot commented Jan 13, 2025

Codecov Report

Attention: Patch coverage is 25.00000% with 6 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@f4f0265). Learn more about missing BASE report.
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
src/node/main.ts 25.00% 2 Missing and 1 partial ⚠️
src/node/routes/vscode.ts 25.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #7162   +/-   ##
=======================================
  Coverage        ?   72.39%           
=======================================
  Files           ?       31           
  Lines           ?     1913           
  Branches        ?      414           
=======================================
  Hits            ?     1385           
  Misses          ?      446           
  Partials        ?       82           
Files with missing lines Coverage Δ
src/node/main.ts 48.18% <25.00%> (ø)
src/node/routes/vscode.ts 24.75% <25.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f4f0265...7a86738. Read the comment docs.

@code-asher
Copy link
Member

Interesting! We probably want to do the same in src/node/routes/vscode.ts I imagine? (line 61)

fix: invalid ESM module path on Windows.
@ChenPi11
Copy link
Author

Right. This exception may thrown by vscode.js on Windows.

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

Successfully merging this pull request may close these issues.

issue with windows NPM based installation
2 participants