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

TypeError when running Nitro project with deno run dev #26700

Closed
kotkoroid opened this issue Nov 3, 2024 · 1 comment · Fixed by #27086
Closed

TypeError when running Nitro project with deno run dev #26700

kotkoroid opened this issue Nov 3, 2024 · 1 comment · Fixed by #27086

Comments

@kotkoroid
Copy link

kotkoroid commented Nov 3, 2024

Description

After creating a new project with deno run -A npm:giget@latest nitro nitro-app --install, running it with deno run dev results in a TypeError.

Reproduction Steps

  1. Create a new project using deno run -A npm:giget@latest nitro nitro-app --install
  2. Run the project with deno run dev

Expected Behavior

The project should start without errors.

Actual Behavior

The project fails to start throwing the following error:

error: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'pathname')
    at getPathname (ext:deno_node/_fs/_fs_stat.ts:177:49)
    at ext:deno_node/_fs/_fs_stat.ts:151:13
    at eventLoopTick (ext:core/01_core.js:175:7)

Environment

Deno version: 2.1.1, 2.1.0, 2.0.6, 2.0.5, 2.0.4
Operating system: macOS 15.1
Architecture: Arm64 (M2)

@snakysnake
Copy link

Same error for me when using nuxt

marvinhagemeister added a commit that referenced this issue Nov 27, 2024
We didn't validate the `path` argument that's passed to `fs.stat()` and
`fs.statSync()` which lead to wrong errors being thrown. The
`@rollup/plugin-node-resolve` code calls it with `undefined` quite a lot
which lead to `nitro` and `nuxt` failing.

Fixes #26700

---------

Co-authored-by: Yoshiya Hinosawa <[email protected]>
bartlomieju pushed a commit that referenced this issue Nov 28, 2024
We didn't validate the `path` argument that's passed to `fs.stat()` and
`fs.statSync()` which lead to wrong errors being thrown. The
`@rollup/plugin-node-resolve` code calls it with `undefined` quite a lot
which lead to `nitro` and `nuxt` failing.

Fixes #26700

---------

Co-authored-by: Yoshiya Hinosawa <[email protected]>
@pi0 pi0 mentioned this issue Dec 23, 2024
4 tasks
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 a pull request may close this issue.

2 participants