Open yashveer-bika opened 3 months ago
I believe the issue is that there is /
in the project directory. I just tried doing foo/bar
and it failed for me with the same error, however using foobar
worked fine.
We should improve the regex validation here to prevent /
in the project name: https://github.com/dmmulroy/create-melange-app/blob/develop/src/core/validation.ml#L18-L29
[a-z_0-9.]
I think we need to escape the .
I checked the current regex on regex101, test case of bekka/ui
should not be possible.
https://regex101.com/r/F43nZc/1
Looking into what can cause this bug now
I figured that regex doesn't check for /
because before project name is passed into validate
function, a function parse_project_name_and_dir
in src/core/fs.ml trims bekka/
and all we are left is ui
, which is a valid name. Why it breaks after it tho 🤔. Probably it rans into mkdir issue when it doesnt create dir recursively
I have Node.js v21.7.1. The issue is shown below. I have opam installed and initialized. I tried bun and pnpm as well, got the same error.
Am I missing something?