question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Backslashes on $schema property (Windows)

See original GitHub issue

Current Behavior

When a new plugin project is created or existing plugin projects are migrated, the $schema property contains backslahes in paths.

I am not sure, if this affected by plugin projects only or it is a general issue.

It is a similar problem like #10122

Wouldn’t it be a good idea to add some general tests to ensure that all generators on Windows never use backslashes? I love Nx and like to write tests. So if I could contribute in a feasible way, I would be exited.

Expected Behavior

The $schema property should use forward slashes.

Steps to Reproduce

npx create-nx-workspace@14.1.5 another-monorepo --preset=apps
cd another-monorepo
npm install @nrwl/nx-plugin
npx nx generate @nrwl/nx-plugin:plugin another-plugin

The files libs/another-plugin/project.json and apps/another-plugin-e2e/project.json contain:

"$schema": "..\\..\\node_modules\\nx\\schemas\\project-schema.json"

Environment

   Node : 16.13.2
   OS   : win32 x64
   npm  : 8.1.2

   nx : 14.1.5
   @nrwl/angular : Not Found
   @nrwl/cypress : Not Found
   @nrwl/detox : Not Found
   @nrwl/devkit : 14.1.5
   @nrwl/eslint-plugin-nx : 14.1.5
   @nrwl/express : Not Found
   @nrwl/jest : 14.1.5
   @nrwl/js : 14.1.5
   @nrwl/linter : 14.1.5
   @nrwl/nest : Not Found
   @nrwl/next : Not Found
   @nrwl/node : Not Found
   @nrwl/nx-cloud : 14.0.3
   @nrwl/nx-plugin : 14.1.5
   @nrwl/react : Not Found
   @nrwl/react-native : Not Found
   @nrwl/schematics : Not Found
   @nrwl/storybook : Not Found
   @nrwl/web : Not Found
   @nrwl/workspace : 14.1.5
   typescript : 4.6.4
   rxjs : 6.6.7
   ---------------------------------------
   Community plugins:

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
AgentEndercommented, May 18, 2022

Feel free to throw a PR up, I’ll assign to you.

0reactions
gnuechtelcommented, Aug 5, 2022

Fixed by commit 9e6e01b

Read more comments on GitHub >

github_iconTop Results From Across the Web

Java Properties backslash - Stack Overflow
Backslashes are for escaped character sequences and split lines. Also note that you can use normal '/' slashes for pathnames in Windows. –...
Read more >
Using Forward Slashes (/) and Backslashes (\)
The backslash (\) is the escape character for properties files, so if you edit a properties file by hand, you must use two...
Read more >
Constructing a Bidi Communication Schema Query
In this article · The query must start with the Printer property, which must be preceded by a backslash character ( \ )....
Read more >
Structure of the Registry - Win32 apps - Microsoft Learn
Value names and data can include the backslash character. The name of each subkey is unique with respect to the key that is...
Read more >
WHERE Clause (WMI) - Win32 apps - Microsoft Learn
... event, or schema query. For more information, see Querying with WQL. The WHERE clause is made up of a property or keyword,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found