nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.21k stars 2.31k forks source link

Nx adds root `package.json` to the `dist` in `standalone` React app #27274

Open Lonli-Lokli opened 1 month ago

Lonli-Lokli commented 1 month ago

Current Behavior

Nx adds root package.json to the dist in standalone React app

Expected Behavior

No package.json should be copied

GitHub Repo

https://github.com/Lonli-Lokli/issues-nrwl-nx-27274

Steps to Reproduce

  1. Create repo as per image
  2. Run npm run build
  3. Check that package.json exists in the dist folder image

Nx Report

NX   Report complete - copy this into the issue template

Node           : 18.20.3
OS             : win32-x64
Native Target  : x86_64-windows
npm            : 10.7.0

nx (global)        : 15.9.2
nx                 : 19.5.6
@nx/js             : 19.5.6
@nrwl/jest         : 12.8.0
@nx/linter         : 19.5.6
@nx/eslint         : 19.5.6
@nrwl/linter       : 12.8.0
@nx/workspace      : 19.5.6
@nrwl/cypress      : 12.8.0
@nx/devkit         : 19.5.6
@nx/eslint-plugin  : 19.5.6
@nx/react          : 19.5.6
@nrwl/storybook    : 12.8.0
@nrwl/tao          : 19.5.6
@nx/vite           : 19.5.6
@nx/web            : 19.5.6
typescript         : 5.5.4
---------------------------------------
Registered Plugins:
@nx/vite/plugin
---------------------------------------
The following packages should match the installed version of nx
  - @nrwl/jest@12.8.0
  - @nrwl/linter@12.8.0
  - @nrwl/cypress@12.8.0
  - @nrwl/storybook@12.8.0

To fix this, run `nx migrate nx@19.5.6`

Failure Logs

No response

Package Manager Version

10.7.0

Operating System

Additional Information

No response

Lonli-Lokli commented 1 month ago

Btw I don't know why I have @nrwl/jest : 12.8.0 I just generated fresh new repo