Git Product home page Git Product logo

Comments (8)

tinesoft avatar tinesoft commented on June 7, 2024

Hi @batnyu

Thanks for using the plugin and for reporting this.

The signature of createNodesFor method (from common-jvm) has changed in the latest version.
But that should be transparent for you. I'n fact I tried to create an application using the latest nx-spring-boot plugin and it worked fine...

  • can you try reinstalling dependencies, after having removed the node_modules folder ?
$ npx nx reset ( to kill Nx daemon)
$ rm -rf node_modules
$ npm install
  • Can you share the output of the npx nx report command please?

from nxrocks.

batnyu avatar batnyu commented on June 7, 2024

Hi @tinesoft, thanks for your quick answer and your work on this project!

I tried resetting Nx, node-modules but I get the same error.

Here is the result of "npx nx report"

Node : 20.10.0
OS : win32-x64
npm : 10.2.3

nx : 18.0.4
@nx/js : 18.0.4
@nx/jest : 18.0.4
@nx/linter : 18.0.4
@nx/eslint : 18.0.4
@nx/workspace : 18.0.4
@nx/angular : 18.0.4
@nx/cypress : 18.0.4
@nx/devkit : 18.0.4
@nx/esbuild : 18.0.4
@nx/eslint-plugin : 18.0.4
@nx/plugin : 18.0.4
@nx/storybook : 18.0.4
@nrwl/tao : 18.0.4
@nx/web : 18.0.4
@nx/webpack : 18.0.4
typescript : 5.3.3

Community plugins:
@ngneat/transloco : 5.0.7
@nxrocks/nx-spring-boot : 9.2.2
@storybook/angular : 7.5.1
ng2-charts : 4.1.1

I downgraded to @nxrocks/[email protected] to display the report.
Maybe the error is caused by nx 18

from nxrocks.

tinesoft avatar tinesoft commented on June 7, 2024

Can you get me through the actions you took step by step, to have the issue?
Because I cannot reproduce it...

What I did:

$ npx --yes create-nx-workspace@latest nx18
$ cd nx18
$ npm install --save-dev @nxrocks/nx-spring-boot@latest

$ npx nx report  (worked fined)
$ npx nx g @nxrocks/nx-spring-boot:project  (to generate a project, worked fine)

My Nx Report

$ npx nx report

 >  NX   Report complete - copy this into the issue template

   Node   : 18.16.0
   OS     : win32-x64
   npm    : 9.5.1

   nx             : 18.0.4
   @nx/js         : 18.0.4
   @nx/workspace  : 18.0.4
   @nx/devkit     : 18.0.4
   @nrwl/tao      : 18.0.4
   ---------------------------------------
   Community plugins:
   @nxrocks/nx-spring-boot : 9.3.0

from nxrocks.

vixncu avatar vixncu commented on June 7, 2024

I confirm this happens to me too after upgrading to 9.3.0.

For me it was like this:

  1. Migrated to nx18 (from 17)
  2. Upgraded @nxrocks/nx-spring-boot to 9.3.0 (using yarn add @nxrocks/nx-spring-boot)

And that's it. After these 2 steps, whenever I run an nx command I get the following error:
(0 , common_jvm_1.createNodesFor) is not a function

Verbose dump of the command I ran:

yarn run build:ui-apps --verbose

 NX   (0 , common_jvm_1.createNodesFor) is not a function


Because of the error the Nx daemon process has exited. The next Nx command is going to restart the daemon process.
If the error persists, please run "nx reset".

{
  stack: 'TypeError: (0 , common_jvm_1.createNodesFor) is not a function\n' +
    '    at createNodesFn (/Users/vixncu/IdeaProjects/virtualconfig/node_modules/@nxrocks/nx-spring-boot/src/graph/create-nodes.js:8:61)\n' +
    '    at Object.<anonymous> (/Users/vixncu/IdeaProjects/virtualconfig/node_modules/@nxrocks/nx-spring-boot/src/index.js:12:56)\n' +
    '    at Module._compile (node:internal/modules/cjs/loader:1376:14)\n' +
    '    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)\n' +
    '    at Module.load (node:internal/modules/cjs/loader:1207:32)\n' +
    '    at Module._load (node:internal/modules/cjs/loader:1023:12)\n' +
    '    at Module.require (node:internal/modules/cjs/loader:1235:19)\n' +
    '    at require (node:internal/modules/helpers:176:18)\n' +
    '    at /Users/vixncu/IdeaProjects/virtualconfig/node_modules/nx/src/utils/nx-plugin.js:79:87\n' +
    '    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
    '    at async loadNxPluginAsync (/Users/vixncu/IdeaProjects/virtualconfig/node_modules/nx/src/utils/nx-plugin.js:79:38)\n' +
    '    at async loadNxPlugins (/Users/vixncu/IdeaProjects/virtualconfig/node_modules/nx/src/utils/nx-plugin.js:105:21)\n' +
    '    at async retrieveProjectConfigurations (/Users/vixncu/IdeaProjects/virtualconfig/node_modules/nx/src/project-graph/utils/retrieve-workspace-files.js:45:21)\n' +
    '    at async processFilesAndCreateAndSerializeProjectGraph (/Users/vixncu/IdeaProjects/virtualconfig/node_modules/nx/src/daemon/server/project-graph-incremental-recomputation.js:140:28)\n' +
    '    at async getCachedSerializedProjectGraphPromise (/Users/vixncu/IdeaProjects/virtualconfig/node_modules/nx/src/daemon/server/project-graph-incremental-recomputation.js:43:16)\n' +
    '    at async handleRequestProjectGraph (/Users/vixncu/IdeaProjects/virtualconfig/node_modules/nx/src/daemon/server/handle-request-project-graph.js:12:24)',
  message: '(0 , common_jvm_1.createNodesFor) is not a function\n' +
    '\n' +
    'Because of the error the Nx daemon process has exited. The next Nx command is going to restart the daemon process.\n' +
    'If the error persists, please run "nx reset".'
}

from nxrocks.

dagassmann avatar dagassmann commented on June 7, 2024

I use the @nxrocks/nx-quarkus library and ran into the same problem after upgrading from 7.2.2 to 7.3.0.
It seems the issue is that dependencies between @nxrocks libraries are managed using "*".
After I ran the following commands which updated the libraries to the latest version it worked again:

npm i @nxrocks/[email protected]
npm i @nxrocks/[email protected]

Hence it works when a new workspace is created but it breaks during updates. Maybe a good approach would be to specify versions more explicitly in the respective package.json instead of "*".

from nxrocks.

tinesoft avatar tinesoft commented on June 7, 2024

Hi @vixncu , @dagassmann

Thanks for using the libraries and for the provided debug information (don't forget to ⭐ the project on Github, it helps ^^)

@dagassmann You might be on something indeed...

The "*" for the internal dependencies is required, because when publishing (which is done at once for all packages) , I don't know the exact version ahead of time. The "*" is to instruct NPM to use the latest version on NPM... This has always worked so far, as the @nxrocks/common-* are published first....

Something must be broken somewhere in that process.

I will have a closer look and let you know.

Stay tuned

from nxrocks.

blackholegalaxy avatar blackholegalaxy commented on June 7, 2024

I also encounter the problem. Nx at 18.0.6. Angular and flutter project. We use @nxrocks/nx-flutter and bumping from 8.1.0 to 8.2.0 immediately created the error.

It impacts every NX command.

(0 , common_1.createNodesFor) is not a function


Because of the error the Nx daemon process has exited. The next Nx command is going to restart the daemon process.
If the error persists, please run "nx reset".

Downgrading to 8.1.0 fixes the issue.

Please note we use yarn 4.1.0

from nxrocks.

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.