Skip to content

Regression in configuring email templates within a monorepo #2721

Description

@lauri865

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

Previously, configuring email templates in a monorepo setting work fine, but now we seem to be locked within the supabase parent directory (I don't know from what version).

This used to work

[auth.email.template.magic_link]
subject = "Sign in..."
content_path = "../packages/emails/out/magic-link.html"

But now it complains

Using workdir /Users/[redacted]/dev/[monorepo_root]/apps
Supabase CLI 1.200.3
Invalid config for auth.email.magic_link.content_path: ./../packages/emails/out/magic-link.html

And I believe it used to complain when the file didn't exist, but now it seems to create en empty directory named packages/emails/out/magic-link.html (yes, a directory named *.html, not even a file).

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Create a monorepo where emails live outside of the parent directory of supabase
  2. Use the above config where content_path is similar to above

E.g. our monorepo structure is:
Supabase is in apps/supabase
Email templates are in packages/emails

This used to work perfectly fine, but since (somewhat) recently, has stopped working.

Expected behavior

Path should resolve correctly.

Screenshots

This is the erroneous directory it creates.
Screenshot 2024-10-01 at 16 17 22

System information

  • OS: macOS
  • Browser (if applies) [e.g. chrome, safari]
  • Version of supabase-js: [e.g. 6.0.2]
  • Version of Node.js: [e.g. 10.10.0]

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions