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

Running Nestjs application on Nx 16.1.4 #16914

Closed
1 of 4 tasks
elviscoly opened this issue May 10, 2023 · 5 comments
Closed
1 of 4 tasks

Running Nestjs application on Nx 16.1.4 #16914

elviscoly opened this issue May 10, 2023 · 5 comments

Comments

@elviscoly
Copy link

Current Behavior

I'm trying to run nx serve api on my nx monorepo application.

Expected Behavior

Suppose to run successful

GitHub Repo

No response

Steps to Reproduce

Error: Only URLs with a scheme in: file, data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'

Nx Report

Error: Only URLs with a scheme in: file, data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'

Failure Logs

Error: Only URLs with a scheme in: file, data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

@danielritter
Copy link

danielritter commented May 10, 2023

I have the same problem. Issue shows up on a new nx 16.1 angular-nest project. Building works, but not serving.

Use nx 16.1.3

Stacktrace:

> nx run backend:serve:development

chunk (runtime: main) main.js (main) 81.6 KiB [entry] [rendered]
webpack compiled successfully (c7142c0862194857)
Debugger listening on ws://localhost:9229/a4d5cfed-8c9f-48e5-a362-9a074a2962b1
Debugger listening on ws://localhost:9229/a4d5cfed-8c9f-48e5-a362-9a074a2962b1
For help, see: https://nodejs.org/en/docs/inspector
Error: 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 'c:'
    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:1186:29)
    at importModuleDynamicallyWrapper (node:internal/vm/module:429:21)
    at importModuleDynamically (node:internal/vm:106:46)

@danielritter
Copy link

danielritter commented May 10, 2023

@davidzem
Copy link

davidzem commented May 10, 2023

I have the same issue , my node version 19.9.0 , nx version 16.1.4
nxNestError

@AgentEnder
Copy link
Member

Hey 👋 I'm closing this out since its a duplicate and already solved. Stay tuned for next release 📺

@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants