nx
nx copied to clipboard
Unable to load schema from [user]/[repo]/node_modules/nx/schemas/nx-schema.json
Current Behavior
After switching to yarn PnP zero install, I noticed that VSCode no longer locates files that were previously pointing to node_modules folder. How do we solve this problem?
Expected Behavior
NX.json / Project.json "$schema" property is pointing to a valid json file
GitHub Repo
No response
Steps to Reproduce
- Generate a brand new NX workspace.
- Switch to yarn PnP https://nx.dev/recipes/tips-n-tricks/yarn-pnp.
- Generate Next.JS app with the NX generator.
- Open project.json of the new app.
- The property "$schema" points to a json file in the node_modules folder.
Nx Report
Node : 19.7.0
OS : darwin-arm64
yarn : 3.6.2
nx : 16.7.2
@nx/js : 16.7.2
@nx/jest : 16.7.2
@nx/linter : 16.7.2
@nx/cypress : 16.7.2
@nx/eslint-plugin : 16.7.2
@nx/next : 16.7.2
@nx/react : 16.7.2
@nx/storybook : 16.7.2
@nx/vite : 16.7.2
@nx/web : 16.7.2
nx-cloud : 16.4.0-beta.1
typescript : 5.1.6
---------------------------------------
Community plugins:
@jscutlery/semver : 3.1.0
raykosim@K7Q944JT6X pokerstars-web-client %
Failure Logs
No response
Operating System
- [X] macOS
- [ ] Linux
- [ ] Windows
- [ ] Other (Please specify)
Additional Information
No response
@meeroslav We discussed this issue. Did we have a solution for this issue?
Not really. Since there will be no nx
package in the node_modules, we can perhaps point to an online version of it - https://www.runpkg.com/[email protected]/schemas/nx-schema.json or host it ourselves.
Another option would be to copy schemas on post-install to node_modules
Any update on this? #bump
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏
I'm having the exact same issue. What is the proposed best practice for this? I'm guessing that this same issue occurs as soon as one generates anything really, which adds manual labour to the process.
What about making the schema available through a URL under nx.dev? For example, Biome has https://biomejs.dev/schemas/1.8.3/schema.json
Yes I also agree that would be a nice idea.