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

macOS Error: Exercise directory .DS_Store does not match regex /^(?<number>\d+)-/ #14

Open
tiagocouto126 opened this issue Oct 7, 2022 · 4 comments

Comments

@tiagocouto126
Copy link

tiagocouto126 commented Oct 7, 2022

It seems that on macOS this might be a problem when running npm run dev or node dev in the root:

throw new Error(`Exercise directory ${dir} does not match regex ${regex}`);
          ^

Error: Exercise directory .DS_Store does not match regex /^(?<number>\d+)-/
    at null.extractExerciseNumber (/remix-fundamentals-main/scripts/utils/utils.ts:102:11)
    at null.getAppFromPath (/remix-fundamentals-main/scripts/utils/utils.ts:115:36)
    at Array.map (<anonymous>)
    at null.<anonymous> (/remix-fundamentals-main/scripts/utils/utils.ts:113:16)
    at async Promise.all (index 0)
    at null.getApps (/remix-fundamentals-main/scripts/utils/utils.ts:109:50)
    at null.promptForApp (/remix-fundamentals-main/scripts/utils/utils.ts:248:16)
    at null.go (/remix-fundamentals-main/scripts/dev/dev.ts:13:11)
  1. I've removed part of the path name for ease of read
  2. no error if npm run dev on an exercise directory (since there is no .DS_Store)
  3. I know I can remove this files (even disable) and it will skip this error, until the file is created again, so maybe a filter for directories/name pattern would help here: scripts/utils.ts
@brianseries
Copy link

had the same issue, for anybody that comes here in the future, as stated above, you can remove the file. in the application root run

rm exercise/.DS_Store

@mlaurel
Copy link

mlaurel commented Nov 13, 2022

I'm having this same issue... I've tried different versions of node, but still get the same error mentioned above when running npm run setup.

I don't see the file /exercises/.DS_Store, so nothing to remove there.

throw new Error(`Exercise directory ${dir} does not match regex ${regex}`);
      ^

Error: Exercise directory .DS_Store does not match regex /^(?<number>\d+)-/
    at extractExerciseNumber (/remix-fundamentals/scripts/utils/utils.ts:102:11)
    at getAppFromPath (/remix-fundamentals/scripts/utils/utils.ts:151:36)
    at Array.map (<anonymous>)
    at <anonymous> (/remix-fundamentals/scripts/utils/utils.ts:149:16)
    at async Promise.all (index 1)
    at getApps (/remix-fundamentals/scripts/utils/utils.ts:109:50)
    at runInDirs (/remix-fundamentals/scripts/utils/utils.ts:269:13)

@tiagocouto126
Copy link
Author

I'm having this same issue... I've tried different versions of node, but still get the same error mentioned above when running npm run setup.

I don't see the file /exercises/.DS_Store, so nothing to remove there.

throw new Error(`Exercise directory ${dir} does not match regex ${regex}`);
      ^

Error: Exercise directory .DS_Store does not match regex /^(?<number>\d+)-/
    at extractExerciseNumber (/remix-fundamentals/scripts/utils/utils.ts:102:11)
    at getAppFromPath (/remix-fundamentals/scripts/utils/utils.ts:151:36)
    at Array.map (<anonymous>)
    at <anonymous> (/remix-fundamentals/scripts/utils/utils.ts:149:16)
    at async Promise.all (index 1)
    at getApps (/remix-fundamentals/scripts/utils/utils.ts:109:50)
    at runInDirs (/remix-fundamentals/scripts/utils/utils.ts:269:13)

Do you have the hidden files visible? Use "CMD + shift + ." to toggle it.

You can delete that file or change in the utility ts file to filter and exclude so it can prevent that error. I've changed to filter the directory before the iteration.

@mlaurel
Copy link

mlaurel commented Nov 13, 2022

I'm showing hidden files... the file isn't there.

FWIW, I ended up finding an old remix-fundamental repo from a few weeks ago and pulled latest. Ran npm run setup and it went through the whole setup script and node dev worked this time!

My TS knowledge is so weak, I don' think I'm going to try and figure out what went wrong... just picking back up with Remix. Thanks for the help regardless.

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

No branches or pull requests

3 participants