Giter VIP home page Giter VIP logo

Comments (3)

codemile avatar codemile commented on July 23, 2024

Did you add the plugin?

nx add @nx/vite

from nx.

cgbin24 avatar cgbin24 commented on July 23, 2024

Did you add the plugin?

nx add @nx/vite

Yes, the '@nx/vite' dependency is already installed in the package in the root directory and is also present in the 'node_modules'

image
image

from nx.

Coly010 avatar Coly010 commented on July 23, 2024

Because you were unable to run nx report the problem is harder to identify on your end.

You're encountering this issue because you're using mismatched versions of the nx and @nx/ packages.
They are expecting APIs from other packages that just aren't there because of this version mismatch.

When I manually patch the node_modules/@nx/vite/src/plugin/plugin.js file to fix the issue, and then run nx report I get the following:

 NX   Report complete - copy this into the issue template

Node   : 20.12.2
OS     : darwin-arm64
npm    : 10.5.0

nx                 : 19.1.2
@nx/js             : 19.2.0
@nx/jest           : 19.1.2
@nx/linter         : 19.1.2
@nx/eslint         : 19.1.2
@nx/workspace      : 19.1.2
@nx/devkit         : 19.1.2
@nx/eslint-plugin  : 19.1.2
@nx/react          : 19.1.2
@nrwl/tao          : 19.1.2
@nx/vite           : 19.2.0
@nx/vue            : 19.2.0
@nx/web            : 19.2.0
typescript         : 5.4.5
---------------------------------------
Registered Plugins:
@nx/vite/plugin
@nx/eslint/plugin
@nx/jest/plugin
---------------------------------------
The following packages should match the installed version of nx
  - @nx/[email protected]
  - @nrwl/[email protected]
  - @nx/[email protected]
  - @nrwl/[email protected]
  - @nx/[email protected]
  - @nx/[email protected]
  - @nrwl/[email protected]

To fix this, run `nx migrate [email protected]`

You can see at the bottom it tells you about the problem in your workspace.

Remember, you MUST keep all your nx package versions aligned.

The easiest way to do this is to use both nx migrate to migrate to newer versions, and nx add when adding new plugnis.

from nx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.