cli icon indicating copy to clipboard operation
cli copied to clipboard

`.DS_Store` causing a failure in Remix

Open jlengstorf opened this issue 2 years ago • 2 comments

Describe the bug

Remix ignores .* files in the routes folder, but when running Netlify CLI a .DS_Store file will cause a routing failure:

[1] Invalid route module file: /app/routes/api/.DS_Store
[1] ◈ Command failed with exit code 1: remix watch. Shutting down Netlify Dev server
[1] cross-env NODE_ENV=development netlify dev exited with code 1
^C[0] npm run dev:css exited with code 0

It's unclear where this is coming from, but is it possible that the Netlify CLI is overriding ignore settings in Remix?

Steps to reproduce

  1. Create a Remix project
  2. Add a .DS_Store file to the /app/routes/api directory
  3. Try to run netlify dev

Configuration

No response

Environment

Reported by a user; unsure what env.

jlengstorf avatar Mar 14 '22 16:03 jlengstorf

I'm currently facing this exact same issue. I'm trying to setup my project running the Netlify CLI and receiving: Error: Invalid route module file: /app/routes/account/.DS_Store I have ignoredRouteFiles: [".*"] added in my remix.config file but that doesn't fix this issue. @jlengstorf Did you happen to find a workaround for this?

mattevans-dev avatar Jun 15 '22 16:06 mattevans-dev

@mattevans-dev my workaround was to delete the .DS_Store manually, but I haven't figured out a more permanent fix.

jlengstorf avatar Jun 16 '22 01:06 jlengstorf

Does anyone of you two have a repo with a remix project where I can test this?

danez avatar Oct 21 '22 08:10 danez

@jlengstorf Is this issue still occurring for you? If yes, could you please provide a repo with the reproduction.

I tried a few Remix templates with the .DS_Store file in routes but wasn't able to reproduce this error.

tinfoil-knight avatar Nov 27 '22 09:11 tinfoil-knight