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

Nest not working on Windows with NX 16.1.4: "Only URLs with a scheme in..." #16973

Closed
1 of 4 tasks
fhemery opened this issue May 12, 2023 · 9 comments
Closed
1 of 4 tasks

Comments

@fhemery
Copy link

fhemery commented May 12, 2023

Current Behavior

I did a fresh install with NX 16.1.4 of a NestJs application on my Windows 11 machine and I am stuck with the following error when running nx serve :

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)

Expected Behavior

I guess it's supposed to not throw such an error😄

GitHub Repo

No response

Steps to Reproduce

  1. npx [email protected] (or latest, as currently they are the same)
  2. Select integrated => nest, then complete the remaining options
  3. nx run app:serve should trigger the error

Nx Report

Node   : 18.16.0
   OS     : win32 x64
   npm    : 9.5.1
   Hasher : Native

   nx                 : 16.1.4
   @nx/js             : 16.1.4
   @nx/jest           : 16.1.4
   @nx/linter         : 16.1.4
   @nx/workspace      : 16.1.4
   @nx/devkit         : 16.1.4
   @nx/eslint-plugin  : 16.1.4
   @nx/nest           : 16.1.4
   @nx/node           : 16.1.4
   @nrwl/tao          : 16.1.4
   @nx/webpack        : 16.1.4
   typescript         : 5.0.4

Failure Logs

No response

Operating System

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

Additional Information

  • I dug a bit and it starts breaking with version 16.1.1. Version 16.1.0 works perfectly.
  • I am pretty sure this is a NX issue, because it does not appear when using directly the Nest CLI (with same nestjs packages, namely 9.4.0)
@pf1gura
Copy link

pf1gura commented May 12, 2023

It is not related to Nest projects only. You can create express or fastify apps and the same issue happens. I think there is something wrong with @nx/js:node executor. build command with esbuild executor works just fine.

@WCN-llc
Copy link

WCN-llc commented May 12, 2023

Reported this error a few days ago. I got a message that it was fixed. Now I checked it and it is still there. Nest does not start.

@wizardnet972
Copy link
Contributor

Duplicate of #16834

@pf1gura
Copy link

pf1gura commented May 12, 2023

I patched current nx version (16.1.1) locally with the fix from #16911 and can confirm it works. That means that fix was not released yet

@AdditionAddict
Copy link

@WCN-llc that

Reported this error a few days ago. I got a message that it was fixed. Now I checked it and it is still there. Nest does not start.

That's normal. They'll make a new release (16.1.5 / 16.2.0 etc.) which includes the fix. Nx can include migrations on minor versions / github has been facing issues recently / they haven't got to it with other focuses. Please be patient or downgrade to 16.1.0 until then

@WCN-llc
Copy link

WCN-llc commented May 12, 2023

@WCN-llc that

Reported this error a few days ago. I got a message that it was fixed. Now I checked it and it is still there. Nest does not start.

That's normal. They'll make a new release (16.1.5 / 16.2.0 etc.) which includes the fix. Nx can include migrations on minor versions / github has been facing issues recently / they haven't got to it with other focuses. Please be patient or downgrade to 16.1.0 until then

Yeah, it's okay.
Thanks :-)

@fhemery
Copy link
Author

fhemery commented May 12, 2023

Thanks for all your feedback. I'll stay in 16.1.0 for now thus.

I'll closely monitor the next releases and close the ticket when I see the next update, so that people encountering the issue bump on this report instead of opening another one like I did 😄

@AgentEnder
Copy link
Member

Yeah, this is a duplicate, so I'm going to close it out. We close issues when the fix is merged, s.t. we can use the issues list as a queue to pull tasks from.

This is also the default behavior from github when you mark that a PR fixes an issue.

@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 12, 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

6 participants