browser still in loading state after adding a lib for my components nx monorepo

Current Behavior

browser still in loading state after adding a lib for my components im using nx monorepo with react and vite

Expected Behavior

the app to be loaded and shown the ui in browser

Steps to Reproduce

  • create nx monorepo
  • add workspace for react
  • add react and typescript in also vite in package.json
  • import your ui in apps/yourApp
  • nx serve yourApp
  • success compilation
  • open the url
  • the app will still in loading state

Nx Report

Node   : 21.5.0
OS     : linux-x64
pnpm   : 8.15.3

nx (global)        : 18.0.0
nx                 : 18.0.6
@nx/js             : 18.0.6
@nx/linter         : 18.0.6
@nx/eslint         : 18.0.6
@nx/workspace      : 18.0.6
@nx/devkit         : 18.0.6
@nx/eslint-plugin  : 18.0.6
@nx/react          : 18.0.6
@nrwl/tao          : 18.0.6
@nx/vite           : 18.0.6
@nx/web            : 18.0.6
typescript         : 5.3.3

Failure Logs

when i try to build:


The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
vite v5.1.4 building for production...

/src/styles.scss doesn't exist at build time, it will remain unchanged to be resolved at runtime
x Build failed in 9.31s
error during build:
Error: Unexpected early exit. This happens when Promises returned by plugins cannot resolve. Unfinished hook action(s) on exit:
(vite:esbuild) transform "/home/oem/ppppppp/paletta monorepo/react-monorepo/Libs/Assets/src/lib/icons/StatistiqueIcon.tsx"
(vite:esbuild) transform "/home/oem/ppppppp/paletta monorepo/react-monorepo/Libs/Assets/src/lib/icons/ExpandRightIcon.tsx"
(vite:esbuild) transform "/home/oem/ppppppp/paletta monorepo/react-monorepo/Libs/Assets/src/lib/icons/HomeIcon.tsx"
(vite:esbuild) transform "/home/oem/ppppppp/paletta monorepo/react-monorepo/Libs/Assets/src/lib/icons/ParcCheckIcon.tsx"
    at process.handleBeforeExit (file:///home/oem/ppppppp/paletta%20monorepo/react-monorepo/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:19915:28)
    at Object.onceWrapper (node:events:634:26)
    at process.emit (node:events:519:28)
Warning: command "vite build" exited with non-zero status code

when i try to serve: (it seems working)

 nx run admin:serve

The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.

  VITE v5.1.4  ready in 402 ms

  ➜  Local:   http://localhost:4200/
  ➜  press h + enter to show help

[TypeScript] Found 0 errors. Watching for file changes.
h

  Shortcuts
  press r + enter to restart the server
  press u + enter to show server url
  press o + enter to open in browser
  press c + enter to clear console
  press q + enter to quit

Package Manager Version

pnpm 8.15.3

Operating System

Linux

Additional Information
enter image description here