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

[Bug?]: Error reloading mailer: Error [ERR_UNSUPPORTED_ESM_URL_SCHEME] #9545

Closed
1 task done
MarcioBarrientos opened this issue Nov 16, 2023 · 4 comments · Fixed by #9752
Closed
1 task done

[Bug?]: Error reloading mailer: Error [ERR_UNSUPPORTED_ESM_URL_SCHEME] #9545

MarcioBarrientos opened this issue Nov 16, 2023 · 4 comments · Fixed by #9752
Assignees
Labels
bug/confirmed We have confirmed this is a bug topic/mailer RedwoodJS Mail and Mailer related

Comments

@MarcioBarrientos
Copy link

MarcioBarrientos commented Nov 16, 2023

What's not working?

Mail Templates are not loading on Redwod Studio using Windows, I get this error:

Reanalysing mailer and mail templates...
Error reloading mailer:
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'd:'
    at new NodeError (node:internal/errors:405:5)
    at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:136:11)
    at defaultLoad (node:internal/modules/esm/load:87:3)
    at nextLoad (node:internal/modules/esm/loader:163:28)
    at ESMLoader.load (node:internal/modules/esm/loader:603:26)
    at ESMLoader.moduleProvider (node:internal/modules/esm/loader:457:22)
    at new ModuleJob (node:internal/modules/esm/module_job:64:26)
    at #createModuleJob (node:internal/modules/esm/loader:480:17)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:434:34)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME'
}
 - Analysed 0 mail templates

How do we reproduce the bug?

After a clean install of Redwood 6.4.0 install the mailer with "yarn rw setup mailer" then start redwood studio

What's your environment? (If it applies)

System:
    OS: Windows 10 10.0.22631
  Binaries:
    Node: 18.18.1 - ~\AppData\Local\Temp\xfs-6fec955d\node.CMD
    Yarn: 3.5.0 - ~\AppData\Local\Temp\xfs-6fec955d\yarn.CMD
  Browsers:
    Edge: Chromium (119.0.2151.58)
  npmPackages:
    @redwoodjs/auth-dbauth-setup: 6.4.0 => 6.4.0
    @redwoodjs/cli-storybook: 6.4.0 => 6.4.0
    @redwoodjs/core: 6.4.0 => 6.4.0
    @redwoodjs/studio: 6.4.0 => 6.4.0

Are you interested in working on this?

  • I'm interested in working on this
@MarcioBarrientos MarcioBarrientos added the bug/needs-info More information is needed for reproduction label Nov 16, 2023
@Josh-Walker-GM Josh-Walker-GM self-assigned this Nov 17, 2023
@Josh-Walker-GM Josh-Walker-GM added bug/confirmed We have confirmed this is a bug and removed bug/needs-info More information is needed for reproduction labels Nov 17, 2023
@Josh-Walker-GM
Copy link
Collaborator

Hey @MarcioBarrientos 👋 Thanks for opening this issue! I've just reproduced it on my windows machine too.

I see you marked you're interested in working a PR for this, great! Feel free to ask me anything here or to tag me elsewhere and I will be more than happy to support you if needed. No pressure though as I can take over if needed.

@Tobbe Tobbe added the topic/mailer RedwoodJS Mail and Mailer related label Nov 21, 2023
@Josh-Walker-GM
Copy link
Collaborator

Josh-Walker-GM commented Nov 22, 2023

Hey @MarcioBarrientos, just wanted to follow up on this one. I'd be keen to see a fix for this issue in the near future. Are you still interested in implementing a fix? If so that's great! I can help get things moving. If not then I'm very happy to take it on myself.

If we don't hear back I'll start on the fix next week.

@MarcioBarrientos
Copy link
Author

@Josh-Walker-GM sorry, I tried to fix it, I prepend "file://' in the import path on windows, now the error is gone but the templates are not loading. I will try again this weekend, If I can't do a PR it would be great if you can fix it.

@Josh-Walker-GM
Copy link
Collaborator

No worries at all @MarcioBarrientos! I'll pick this up on Monday so if there's a PR then I can help out with it or I'll start my own. Thanks again!

Josh-Walker-GM added a commit that referenced this issue Dec 24, 2023
**Problem**
#9545 Highlights some compatibility issues with studio on windows.

**Changes**
1. Removes some assumptions of `/` as the path separator.

**Fixes**
Fixes #9545 in combination with #9639
Tobbe pushed a commit that referenced this issue Jan 1, 2024
**Problem**
#9545 Highlights some compatibility issues with studio on windows.

**Changes**
1. Removes some assumptions of `/` as the path separator.

**Fixes**
Fixes #9545 in combination with #9639
Tobbe pushed a commit that referenced this issue Jan 1, 2024
**Problem**
#9545 Highlights some compatibility issues with studio on windows.

**Changes**
1. Removes some assumptions of `/` as the path separator.

**Fixes**
Fixes #9545 in combination with #9639
@Tobbe Tobbe mentioned this issue Jan 8, 2024
1 task
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/mailer RedwoodJS Mail and Mailer related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants