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]: ERR_UNSUPPORTED_ESM_URL_SCHEME #1905

Closed
1 task done
th3c0d3br34ker opened this issue Nov 14, 2023 · 5 comments · Fixed by actualbudget/actual-server#281
Closed
1 task done

[Bug]: ERR_UNSUPPORTED_ESM_URL_SCHEME #1905

th3c0d3br34ker opened this issue Nov 14, 2023 · 5 comments · Fixed by actualbudget/actual-server#281
Labels
bug Something isn't working
Milestone

Comments

@th3c0d3br34ker
Copy link
Contributor

Verified issue does not already exist?

  • I have searched and found no existing issue

What happened?

Unable to run yarn start using actualbudget/actual-server on windows.

Node version: v18.16.1
actualbudget/actual-server version: v23.11.0

What error did you receive?

Checking if there are any migrations to run for direction "up"...
Rejection: Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file and data are supported by the default 
ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'e:'
    at new NodeError (node:internal/errors:399:5)
    at throwIfUnsupportedURLScheme (node:internal/modules/esm/resolve:1059:11)
    at defaultResolve (node:internal/modules/esm/resolve:1135:3)
    at nextResolve (node:internal/modules/esm/loader:163:28)
    at ESMLoader.resolve (node:internal/modules/esm/loader:838:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
    at ESMLoader.import (node:internal/modules/esm/loader:525:22)
    at importModuleDynamically (node:internal/modules/cjs/loader:1188:29)
    at importModuleDynamicallyWrapper (node:internal/vm/module:429:21)
    at importModuleDynamically (node:internal/vm:106:46) {
  code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME'
}

Where are you hosting Actual?

Locally via Yarn

What browsers are you seeing the problem on?

No response

Operating System

Windows 11

@th3c0d3br34ker th3c0d3br34ker added the bug Something isn't working label Nov 14, 2023
@MatissJanis
Copy link
Member

tj/node-migrate#201

@MrScriptX
Copy link

Maybe a temporary fork to fix the issue should be done, or maybe a downgrade ? Currently, actual is broken on Windows and the issue link is open since August with no PR opened yet.

@MatissJanis
Copy link
Member

I don't have Windows, so sadly I can't reproduce and thus fix it. If anyone is able to repro: a patch PR would be more than welcome.

In the meantime I would recommend using the docker version of Actual. That will work in all environments

https://actualbudget.org/docs/install/docker#launch-container-using-docker-command

@MikesGlitch
Copy link
Contributor

MikesGlitch commented Nov 19, 2023

I fixed the migrate package for windows here (the PR is in draft): tj/node-migrate#202

I think it should work but would someone on Linux be able to check it still works there?

If you clone it down you can just update your Actual Server package.json "migrate" dependency with:

"migrate": "file:../node-migrate",

where the path is the path to the repo.

@MatissJanis
Copy link
Member

Should be solved now. Please let us know if the issue still persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants