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

File path #353

Closed
Fade253 opened this issue Jul 12, 2023 · 2 comments
Closed

File path #353

Fade253 opened this issue Jul 12, 2023 · 2 comments

Comments

@Fade253
Copy link

Fade253 commented Jul 12, 2023

Issue:
Im not sure if this can be seen as an issue but i am trying to run node-windows with a react app to run it as a service, the first problem i was having was it would refuse to import React with or without it being a module, which i managed to fix by using require, however when trying to do the same thing for the other imports that are giving grief i get this really long error and do not know what to do about it. as well in react to render the html inside it you need to have in the index but node-windows errors when it sees < because its inside index.js despite it being inside a render function which should bypass it, please help, and i found these errors in the errlog after running it
node:internal/errors:496
ErrorCaptureStackTrace(err);
^

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 'c:'
at new NodeError (node:internal/errors:405:5)
at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:138:11)
at defaultLoad (node:internal/modules/esm/load:89:3)
at DefaultModuleLoader.load (node:internal/modules/esm/loader:263:26)
at DefaultModuleLoader.moduleProvider (node:internal/modules/esm/loader:179:22)
at new ModuleJob (node:internal/modules/esm/module_job:63:26)
at #createModuleJob (node:internal/modules/esm/loader:203:17)
at DefaultModuleLoader.getJobFromResolveResult (node:internal/modules/esm/loader:156:34)
at DefaultModuleLoader.getModuleJob (node:internal/modules/esm/loader:141:17)
at ModuleWrap. (node:internal/modules/esm/module_job:76:33) {
code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME'
}

Node.js v20.4.0

@Fade253
Copy link
Author

Fade253 commented Jul 13, 2023

i am REALLY stupid and figured it out, i was using the development server when i needed to use express

@coreybutler
Copy link
Owner

Glad you figured it out! Don't beat yourself up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants