Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yarn add ngx-build-plus not working #407

Open
simonebosio91 opened this issue Aug 20, 2024 · 1 comment
Open

yarn add ngx-build-plus not working #407

simonebosio91 opened this issue Aug 20, 2024 · 1 comment

Comments

@simonebosio91
Copy link

Description:

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:

  1. Run yarn add ngx-build-plus in a project that includes Angular.
  2. 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.

@mguay22
Copy link

mguay22 commented Aug 20, 2024

Encountering the same issue here.

"ngx-build-plus": "^17.0.0"

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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants