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

Handle nx monorepo setup #724

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

maciekstosio
Copy link
Contributor

@maciekstosio maciekstosio commented Nov 13, 2024

Fixes #683

This PR adds nx monorepo setup handling by:

  • adding recognizing nx monorepo root
  • installing dependencies in the workspace root
  • adding nx-monorepo test-app

Remarks:

  • I created PR (fix(react-native): default template fails when envs are not set nrwl/nx#28931) to nx so their template doesn't fail in Radon IDE, we don't set their envs, my understanding is that those are used internally by their CLI tool, and I don't think want to implement that
  • iOS fails on bundle install && bundle exec pod install with EACCES: Permission denied I'm investigating if it's related to IDE or something else (i.e. my setup), manual pod install solves the issue seems like problem with my setup (those files were owned by root, reinstalling ruby using rbenv solved the problem)

How Has This Been Tested:

Scenario: Open iOS and Android, check if it builds.
Tested on:

  • workspace-example
  • expo-52
  • nx-monorepo

Copy link

vercel bot commented Nov 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
radon-ide ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2024 2:43pm

@maciekstosio maciekstosio changed the title Handle nx monorepo by recognizing nx monorepo root Handle nx monorepo Nov 14, 2024
@maciekstosio maciekstosio changed the title Handle nx monorepo Handle nx monorepo setup Nov 14, 2024
Copy link
Collaborator

@filip131311 filip131311 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it and it works, but please look at inline comments before you merge

try {
workspaces = require(packageJsonPath).workspaces;
require(nxJsonPath);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a scenario in which require fails for reasons unrelated to nx.json existence?
Could we use fs.existSync() here?

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

Successfully merging this pull request may close these issues.

Radon does not use root node modules in nx workspace
2 participants