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

Build Executor for Expo Copies Entire package.json Instead of Just Project Dependencies #30084

Open
2 of 4 tasks
DimitriSoucanyeDeLandevoisin opened this issue Feb 18, 2025 · 1 comment

Comments

@DimitriSoucanyeDeLandevoisin

Current Behavior

When running the nx build command for an Expo app within an Nx workspace, the build process copies the entire package.json from the root directory into the app's directory. This is unnecessary because only the dependencies specified in the app's package.json should be considered.

Expected Behavior

Only the dependencies specified in the app's package.json should be taken into account during the build process, without copying the entire root package.json file into the app's directory.

GitHub Repo

No response

Steps to Reproduce

  1. Create an Nx workspace with an Expo app.
  2. Add dependencies in the app's package.json.
  3. Also add global dependencies in the root package.json.
  4. Run the nx build command to build the Expo app.
  5. Observe that the root package.json file is copied into the app's directory during the build process.

Nx Report

Node           : 20.17.0
OS             : darwin-arm64
Native Target  : aarch64-macos
yarn           : 4.6.0

nx                     : 20.3.2
@nx/js                 : 20.4.4
@nx/jest               : 20.3.2
@nx/eslint             : 20.3.2
@nx/workspace          : 20.3.2
@nx/devkit             : 20.3.2
@nx/eslint-plugin      : 20.3.2
@nx/expo               : 20.3.2
@nx/module-federation  : 20.3.2
@nx/react              : 20.3.2
@nx/rollup             : 20.4.4
@nx/web                : 20.3.2
@nx/webpack            : 20.3.2
typescript             : 5.6.3
---------------------------------------
Registered Plugins:
@nx/expo/plugin
@nx/eslint/plugin
@nx/jest/plugin
@nx/rollup/plugin

Failure Logs

Package Manager Version

No response

Operating System

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

Additional Information

Hier is the code that copies package.json link

@michail-sygk
Copy link

Same happens for me. Any insight why this is hapennign?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants