I encountered an issue when trying to add ngx-build-plus to my project using Yarn. The installation fails with the following error:
Invariant Violation: could not find a copy of vite to link in C:\GIT\ZeroD\_GitHub\ZD_ClientUnico\node_modules\ngx-build-plus\node_modules\@angular-devkit\build-angular\node_modules
at invariant (C:\Users\WUSIMBOS\AppData\Roaming\nvm\v20.15.0\node_modules\yarn\lib\cli.js:2318:15)
at PackageLinker.<anonymous> (C:\Users\WUSIMBOS\AppData\Roaming\nvm\v20.15.0\node_modules\yarn\lib\cli.js:48524:7)
at Generator.next (<anonymous>)
at step (C:\Users\WUSIMBOS\AppData\Roaming\nvm\v20.15.0\node_modules\yarn\lib\cli.js:310:30)
at C:\Users\WUSIMBOS\AppData\Roaming\nvm\v20.15.0\node_modules\yarn\lib\cli.js:321:13
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Steps to Reproduce:
Run yarn add ngx-build-plus in a project that includes Angular.
Observe the error message during the installation process.
Environment:
Node.js version: 20.15.0 (managed via nvm)
Yarn version: 1.22.22
Angular CLI version: 18.0.6
Expected Behavior:
ngx-build-plus should be installed without errors.
Actual Behavior:
The installation fails with an "Invariant Violation" error, indicating that a copy of vite could not be found.
Additional Context:
This issue might be related to dependency resolution or conflicts within the node_modules structure, particularly involving vite. Attempts to clean node_modules, reinstall dependencies, and force resolutions have not resolved the issue.
error An unexpected error occurred: "could not find a copy of vite to link in /home/mguay//ui/node_modules/ngx-build-plus/node_modules/@angular-devkit/build-angular/node_modules".
Description:
I encountered an issue when trying to add
ngx-build-plus
to my project using Yarn. The installation fails with the following error:Steps to Reproduce:
yarn add ngx-build-plus
in a project that includes Angular.Environment:
Expected Behavior:
ngx-build-plus
should be installed without errors.Actual Behavior:
The installation fails with an "Invariant Violation" error, indicating that a copy of
vite
could not be found.Additional Context:
This issue might be related to dependency resolution or conflicts within the
node_modules
structure, particularly involvingvite
. Attempts to cleannode_modules
, reinstall dependencies, and force resolutions have not resolved the issue.