Skip to content

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

Open
@DimitriSoucanyeDeLandevoisin

Description

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

Activity

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

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions