[Bug]: ENOENT: no such file or directory, scandir '/Users/alejandro/code/fun/remix-quickstart/server/posts'
See original GitHub issueWhich Remix packages are impacted?
-
remix(Remix core) -
create-remix -
@remix-run/architect -
@remix-run/cloudflare-workers -
@remix-run/dev -
@remix-run/express -
@remix-run/netlify -
@remix-run/node -
@remix-run/react -
@remix-run/serve -
@remix-run/server-runtime -
@remix-run/vercel
What version of Remix are you using?
^1.0.3
Steps to Reproduce
In the developer blog tutorial:
- This section https://remix.run/docs/en/v1/tutorials/blog#dynamic-route-params
- This step
💿 Add a getPost function to our post module Put this function anywhere in the app/post.ts module:
When I copy that code in my example, and I go to http://localhost:3000/posts I got this error
ENOENT: no such file or directory, scandir '/Users/alejandro/code/fun/remix-quickstart/server/posts'
Expected Behavior
- I’d expect
/postsnot to be broken. - I’d expect
/posts/:slugnot to be broken
Actual Behavior
Whenever I visit /posts/ or /posts/:slug, I get the error I mentioned above. I already tried using Vercel and Remix Server, but I got the same result.
Am I missing something?
FWIW I’m using Node 14.x
Seems to be related to https://github.com/remix-run/remix/issues/448

Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Error: ENOENT: no such file or directory, scandir
I got the error 'Error: ENOENT: no such file or directory, scandir '**/node_modules/node-sass/vendor', this solution helped me resolve it.
Read more >ENOENT: no such file or directory, scandir · Issue #901 - GitHub
Bundling with esbuild causes the error above to crash the application. Possible causes: bullmq/src/classes/redis-connection.ts. Line 122 in ...
Read more >Error: ENOENT: no such file or directory, scandir - Issues/Bugs ...
... Version: 4.5.2 Summary: I'm getting the error Encountered internal error running command: Error: ENOENT: dos such file or directory, scandir '/User/[Use…
Read more >Error: ENOENT: no such file or directory, scandir ... - YouTube
nodejsError: ENOENT : no such file or directory, scandir '**/node_modules/node-sass/vendor' | Module build failed (from .
Read more >Fix "no such file or directory, scandir" - David Walsh Blog
One recent error I ran into was from a dependency of a dependency: ... throw err; ^ Error: ENOENT: no such file or...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

The tutorial makes it more clear you should use the remix app server now, the file system stuff is relative to the output directory, not the source, go back one more directory since you’re actually in “server/posts/{server-output-file}.js”
I’ll go update it to add this note inline with the file system reading
if you can please share with us your structure and some shots from your code