Comments (8)
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.
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.
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.
I confirm this happens to me too after upgrading to 9.3.0.
For me it was like this:
- Migrated to nx18 (from 17)
- 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.
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.
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.
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)
- [Bug] does not support schematics HOT 5
- [Bug] Nx unable to find fvm despite being present in path HOT 10
- Adopting Nx to SpringBoot MonoRepo's HOT 1
- Run arguments on project level are not pass to ./mvnw spring-boot:run only the ones that are coded to the project.json HOT 5
- [Feature] Configuration Variants HOT 1
- [Feature] (nx-spring-boot) Add Support for Java 21 HOT 2
- [chore] Reduce code smells reported by Sonarcloud
- [Feature] Make sure e2e + smoke tests pass on all OS
- Linking is failing with nx-spring-boot link command [Bug] HOT 1
- [bug] Spring packages are not cached HOT 1
- [Feature] Update plugins to support Nx 17 HOT 14
- [Bug] Support for nx v17.x.x HOT 6
- Executors not working in a multi-module project with more than one level of folders HOT 12
- [Feature] : support java 21 HOT 5
- [Question] Maven dependency management for monorepo libs HOT 16
- [Feature] Run custom Maven commands by nx-spring-boot HOT 2
- [Bug] create-nx-spring-boot fails to run HOT 3
- Cached projects are only restored the "target" folder but not the ~/.m2/repository folder HOT 10
- [Bug] Cannot run any nx command after creating micronaut project HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nxrocks.