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

Deno / Node(Vite?) issue - Uncaught Error: EINVAL: invalid argument, stat #19067

Closed
sortofsleepy opened this issue May 9, 2023 · 11 comments · Fixed by #26475
Closed

Deno / Node(Vite?) issue - Uncaught Error: EINVAL: invalid argument, stat #19067

sortofsleepy opened this issue May 9, 2023 · 11 comments · Fixed by #26475
Assignees
Labels
bug Something isn't working correctly

Comments

@sortofsleepy
Copy link

👋

Attempted to try to start a project today with create-vite-extra. Initially ran into an issue with esbuild that required an upgrade to Deno. However, after doing so, I am still having trouble.
It was suggested that I open the issue here so here I am.

The issue is essentially:

  • after running deno run -A npm:create-vite-extra
  • and going through the prompts, selecting one of the Deno templates
  • and finally running deno task dev

I get the following error

error: Uncaught Error: EINVAL: invalid argument, stat
    at __node_internal_captureLargerStackTrace (ext:deno_node/internal/errors.ts:89:11)
    at __node_internal_uvException (ext:deno_node/internal/errors.ts:182:12)
    at denoErrorToNodeError (ext:deno_node/internal/errors.ts:1826:16)
    at ext:deno_node/_fs/_fs_stat.ts:83:97
    at eventLoopTick (ext:core/01_core.js:181:11)
  • I am on Windows
  • Node is v18.16.0
  • Deno is
deno 1.33.2 (release, x86_64-pc-windows-msvc)
v8 11.4.183.1
typescript 5.0.3
@bartlomieju
Copy link
Member

That might be related to denoland/rusty_v8#1226

@KoenHaagsma
Copy link

Got the same issue.

@kylesloper
Copy link

Yep same here :(

@ifrvn
Copy link

ifrvn commented May 12, 2023

Same here in deno 1.33.3 & v8 11.4.183.2

@bartlomieju bartlomieju self-assigned this May 12, 2023
@bartlomieju bartlomieju added the bug Something isn't working correctly label May 12, 2023
@tiborsaas
Copy link

I have the very same problem on windows 10:

deno 1.33.3 (release, x86_64-pc-windows-msvc)

node v14.17.0

@bartlomieju
Copy link
Member

Thanks for the reports, I will debug and fix it for Deno v1.33.4.

@bartlomieju
Copy link
Member

As a work around you can downgrade Vite to 4.2.0 in the meantime. See linked Vite issue above for more details.

@patak-dev
Copy link

vite@4.3.7 should fix this issue, thanks for the heads up @bartlomieju

@bartlomieju
Copy link
Member

I'm gonna close this issue for now. Let me know if the problem appears again.

@hansSchall
Copy link

The bug still exists (Deno 1.42.4)

Downgrading to Vite 4.2.0 fixed it for me.

@bartlomieju bartlomieju reopened this Apr 21, 2024
@hansSchall
Copy link

To me it seems like Deno behaves differently than Node when the file path is malformed.

I was able to use vite@^5.0.0 when I ensured to inject my own loader (which is using paths with custom url schemes) before vite tries to resolve the import using the default fs loader.

@kt3k kt3k closed this as completed in 285635d Oct 23, 2024
bartlomieju pushed a commit that referenced this issue Oct 25, 2024
In libuv on windows, `ERROR_INVALID_NAME` is mapped to `ENOENT`, but it
is mapped to `EINVAL` in our compat implementation, which causes the
issue #24899.

ref:
https://github.com/libuv/libuv/blob/d4ab6fbba4669935a6bc23645372dfe4ac29ab39/src/win/error.c#L138

closes #24899 
closes #26411
closes #23635
closes #21165
closes #19067
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants