nrwl / nx

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

`build` command doesn't run the actual script after upgrading to `19.4.0` #26833

Closed ecoms-ye closed 1 week ago

ecoms-ye commented 1 month ago

Current Behavior

Hello, when I tried to build a vite subpackage with pnpm nx build PACKAGE_NAME, the vite script not actually running after upgrading nx from 19.3.1 to 19.4.0.

# vite script not actually running (after upgrading to `19.4.0`)
$ pnpm nx build PACKAGE_NAME

> nx run PACKAGE_NAME:build

——————————————————————————————————————————————————————————————————

 NX   Successfully ran target build for project PACKAGE_NAME (229ms)

Expected Behavior

It can be solved by rolling back nx to 19.3.2.

# vite is executed (after rolling back to `19.3.2`)
$ pnpm nx build PACKAGE_NAME
# [Dependent script outputs]
> nx run PACKAGE_NAME:generate-type  [local cache]

> PACKAGE_NAME@0.1.0 generate-type /PATH/packages/PACKAGE_NAME
> tsc --project tsconfig.declaration.json

> nx run PACKAGE_NAME:build  [local cache]

# [Vite's outputs]
dist/PACKAGE_NAME.css      16.82 kB │ gzip:  4.52 kB
✓ built in 1.93s

——————————————————————————————————————————————————————————————————

 NX   Successfully ran target build for project PACKAGE_NAME and 1 task it depends on (64ms)

Nx read the output from the cache instead of running the command for 2 out of 2 tasks.

GitHub Repo

No response

Steps to Reproduce

Sorry it's a unstandard private project without any @nx/* plugins. May I create a reproduce-able repo later after work?

Nx Report

$ pnpm nx report

 NX   Report complete - copy this into the issue template

Node   : 20.15.0
OS     : linux-x64
pnpm   : 9.4.0

nx          : 19.4.0
@nrwl/tao   : 19.4.0
typescript  : 5.5.3

Failure Logs

No response

Package Manager Version

No response

Operating System

Additional Information

AgentEnder commented 1 month ago

Hey @ecoms-ye - can you attach a minimum reproduction?

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because no reproduction was provided within 7 days. Please help us help you. Providing a repository exhibiting the issue helps us diagnose and fix the issue. Any time that we spend reproducing this issue is time taken away from addressing this issue and other issues. This issue will be closed in 21 days if a reproduction is not provided. If a reproduction has been provided, please reply to keep it active. Thanks for being a part of the Nx community! 🙏