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

Provided schema doesn't exist for path with space in name #5450

Closed
DevanB opened this issue May 6, 2022 · 4 comments · Fixed by #5506
Closed

Provided schema doesn't exist for path with space in name #5450

DevanB opened this issue May 6, 2022 · 4 comments · Fixed by #5506
Assignees
Labels
bug/confirmed We have confirmed this is a bug topic/cli

Comments

@DevanB
Copy link

DevanB commented May 6, 2022

Hi there! Sometime recently I upgraded from 1.1 to 1.3. After doing this (painlessly), I noticed an error when I would run yarn rw prisma migrate dev in the form of:

Error: Provided --schema at /Users/devanb/My doesn't exist.
The full error can be seen here
21:24 $ yarn rw prisma migrate dev
(node:48782) [FST_MODULE_DEP_FASTIFY-REPLY-FROM] FastifyWarning.fastify-reply-from: fastify-reply-from has been deprecated. Use @fastify/[email protected] instead.
(Use `node --trace-warnings ...` to show where the warning was created)

Running Prisma CLI...
$ yarn prisma migrate dev --schema ""/Users/dbeitel/My Apps/my-rw-app/api/db/schema.prisma""

Environment variables loaded from .env
Error: Provided --schema at /Users/dbeitel/My doesn't exist.

Since the initial time I got the error, I had changed my parent folder to not have a space within it and went on my way. However, over the last few days, I've seen others recording this issue on Discord as well. So I decided to create this quick walk-through to create a minimal reproduction:

  1. In the terminal run mkdir -p My\ Apps && cd My\ Apps
  2. After creating and changing into the directory, execute yarn create redwood-app my-rw-app --typescript
  3. Once the project setup is complete, change into the new project with cd my-rw-app
  4. Finally, execute the Prisma migrate command with yarn rw prisma migrate dev

Assuming all goes as (unfortunately) planned, you should be presented with an error very similar to the one at the beginning of this post (within the details accordion).

I'll be glad to assist as much as possible, but wouldn't know where to begin to debug this issue.

@jtoar jtoar added this to Triage May 6, 2022
@jtoar jtoar moved this to Needs triage in Triage May 6, 2022
@jtoar jtoar self-assigned this May 6, 2022
@jtoar jtoar added bug/confirmed We have confirmed this is a bug topic/cli labels May 6, 2022
@jtoar
Copy link
Contributor

jtoar commented May 6, 2022

@DevanB Thanks for the write up! I can reproduce this. And I think I've narrowed it down to the change I made here: #5147. The debugger shows the problem pretty clearly:

image

I made the change to fix this issue: #5135.

Would you be up for trying to fix this one now that we think we know where things are going wrong?

@jtoar jtoar added this to Main May 6, 2022
@jtoar jtoar moved this to Triage in Main May 8, 2022
@dac09
Copy link
Contributor

dac09 commented May 9, 2022

Could we make sure there’s a unit test for this when the fix is in place please?

@jtoar jtoar removed this from Triage May 9, 2022
@Isaac-Tait
Copy link
Contributor

For posterity sake I am sharing the forum post I created when I ran into this same issue here Replacing the space in the folder name with an underscore _ alleviated the issue.

@jtoar jtoar moved this from Triage to In Progress in Main May 10, 2022
@jtoar jtoar removed this from Main May 11, 2022
@jtoar
Copy link
Contributor

jtoar commented May 12, 2022

@DevanB @Isaac-Tait this is now patched in v1.3.3: https://github.com/redwoodjs/redwood/releases/tag/v1.3.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/confirmed We have confirmed this is a bug topic/cli
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants