Error - jhipster-native - TypeError: contents.replaceAll is not a function - jhipster

I am creating a monolith app with jhipster-native. I got the following error.
ERROR! contents.replaceAll is not a function
TypeError: contents.replaceAll is not a function
at file:///usr/local/lib/node_modules/generator-jhipster-native/generators/server/generator.mjs:311:57
at default.editFile (file:///usr/local/lib/node_modules/generator-jhipster-native/generators/server/generator.mjs:447:17)
at default.replaceUndertowWithTomcat (file:///usr/local/lib/node_modules/generator-jhipster-native/generators/server/generator.mjs:311:16)
at Object. (/usr/local/lib/node_modules/generator-jhipster-native/node_modules/yeoman-generator/lib/index.js:1097:23)
at /usr/local/lib/node_modules/generator-jhipster-native/node_modules/run-async/index.js:49:25
at new Promise ()
at /usr/local/lib/node_modules/generator-jhipster-native/node_modules/run-async/index.js:26:19
at /usr/local/lib/node_modules/generator-jhipster-native/node_modules/yeoman-generator/lib/index.js:1098:9
at new Promise ()
at default.executeTask (/usr/local/lib/node_modules/generator-jhipster-native/node_modules/yeoman-generator/lib/index.js:1069:12)
The jhipster-native options are below.
Thank you in advance!
===================== JHipster Native =====================
info Using blueprint generator-jhipster-native for app subgenerator
Application files will be generated in folder: /Users/albanomataj/Projects/amataj/jhipster-examples/spring-native
_______________________________________________________________________________________________________________
Documentation for creating an application is at https://www.jhipster.tech/creating-an-app/
If you find JHipster useful, consider sponsoring the project at https://opencollective.com/generator-jhipster
_______________________________________________________________________________________________________________
? Which *type* of application would you like to create? Monolithic application (recommended for simple projects)
? What is the base name of your application? jhipster
info Using blueprint generator-jhipster-native for server subgenerator
? Do you want to make it reactive with Spring WebFlux? No
? What is your default Java package name? com.mycompany.myapp
? Which *type* of authentication would you like to use? OAuth 2.0 / OIDC Authentication (stateful, works with Keycloak and Okta)
? Which *type* of database would you like to use? SQL (H2, PostgreSQL, MySQL, MariaDB, Oracle, MSSQL)
? Which *production* database would you like to use? PostgreSQL
? Which *development* database would you like to use? H2 with disk-based persistence
? Which cache do you want to use? (Spring cache abstraction) No cache - Warning, when using an SQL database, this will disable the Hibernate 2nd level cache!
? Would you like to use Maven or Gradle for building the backend? Maven
? Do you want to use the JHipster Registry to configure, monitor and scale your application? No
? Which other technologies would you like to use?
? Which *Framework* would you like to use for the client? Angular
? Do you want to generate the admin UI? Yes
? Would you like to use a Bootswatch theme (https://bootswatch.com/)? Default JHipster
? Would you like to enable internationalization support? No
? Please choose the native language of the application English
? Besides JUnit and Jest, which testing frameworks would you like to use?
? Would you like to install other generators from the JHipster Marketplace? No

Related

How to let users install pre-built apps like wordpress plugin on a nodejs / vuejs / postgres SaaS webapp

I would like to create a SaaS app where user start with a very simple webapp to which they could add functionnalities once they are available.
The constraint is I don't want to impose those functionalities and I want the user to be able to install them only if they want to.
This is how work wordpress with plugins. But how to do this kind of thing with a vuejs project that is built ? Once it's built there is no way to bring in new stuff right ?
This would ne paired with a REST api + Postgres.
As anyone created or used something that let us build those kind of webapp ?
I need help to know in which direction I should search about this.
Thanks !!

Jhipster related query

Can i use javascript instead of typescript in Jhipster tool .I have set the environment and project structure where I found typescript is being used as a file for react side , so my qus is can we have a project skeleton of javascript instead of typescript.pls respond?
You can't configure JHipster to generate frontend code in Javascript.
If you are ok with using an old version of JHipster (and Angular instead of React), JHipster 4 can generate your client-side using AngularJS.
Install the latest version 4.x locally:
npm i generator-jhipster#4.14.5
Create an application:
jhipster
When prompted about the frontend framework, choose AngularJS:
? Which *Framework* would you like to use for the client?
Angular 5
> AngularJS 1.x
If you must absolutely use javascript, I think this is the easiest way.

Basic app generation failing using jhipster: "TypeError: Cannot read property 'addQmark' of undefined"

Very basic application generation failing with error mention in title. I have upgrading Node to latest version 8.11.3, npm to 6.1.0 and installed latest yarn and yo but still getting the same error.
Attaching complete console log for application generation:
? Which type of application would you like to create? Monolithic
application (recommended for simple projects)
? What is the base name of your application? automate
? What is your default Java package name? com.automate
? Do you want to use the JHipster Registry to configure, monitor and
scale your application? No
? Which type of authentication would you like to use? JWT
authentication (stateless, with a token)
? Which type of database would you like to use? SQL (H2, MySQL,
MariaDB, PostgreSQL, Oracle, MSSQL)
? Which production database would you like to use? MySQL
? Which development database would you like to use? MySQL
? Do you want to use the Spring cache abstraction? No - Warning, when
using an SQL database, this will disable the Hiber nate 2nd level
cache!
? Would you like to use Maven or Gradle for building the backend?
Maven
? Which other technologies would you like to use?
? Which Framework would you like to use for the client? Angular 6
? Would you like to enable SASS support using the LibSass
stylesheet preprocessor? No
? Would you like to enable internationalization support? No
? Besides JUnit and Jest, which testing frameworks would you like to
use?
? Would you like to install other generators from the JHipster
Marketplace? No
events.js:183
throw er; // Unhandled 'error' event
^
TypeError: Cannot read property 'addQmark' of undefined
at Compiler. (C:\Users\dellPC\AppData\Local\Yarn\Data\global\node_modules\nanomatch\lib\compilers.js:92:16)
at Compiler.visit (C:\Users\dellPC\AppData\Local\Yarn\Data\global\node_modules\snapdragon\lib\compiler.js:129:15)
at Compiler.mapVisit (C:\Users\dellPC\AppData\Local\Yarn\Data\global\node_modules\snapdragon\lib\compiler.js:143:12)
at Compiler.compile (C:\Users\dellPC\AppData\Local\Yarn\Data\global\node_modules\snapdragon\lib\compiler.js:168:10)
at Snapdragon.compile (C:\Users\dellPC\AppData\Local\Yarn\Data\global\node_modules\snapdragon\index.js:156:32)
at C:\Users\dellPC\AppData\Local\Yarn\Data\global\node_modules\micromatch\index.js:786:23
at memoize (C:\Users\dellPC\AppData\Local\Yarn\Data\global\node_modules\micromatch\index.js:859:13)
at Function.micromatch.compile (C:\Users\dellPC\AppData\Local\Yarn\Data\global\node_modules\micromatch\index.js:783:10)

node.js REST client for JHipster application

I have generated jhipster web-app, it comes with REST APIs.
Now, I would like to integrate an existing node.js application to jhipster web-app.
Is there a way to generate a rest-jhipster-client from existing jhipster app? Instead of manually creating functions and calls? Currently using node-rest-client for this
Thank you!
JHipster exposes your REST API documentation using swagger.
So you should look for swagger codegen to generate your client code from swagger JSON specification file, for your Jhipster app it is available at /v2/api-docs URL.
I'm not a nodejs expert but you could have a look at this one: https://www.npmjs.com/package/swagger-js-codegen

Servicestack - run built-in clients on the .net client profile framework

Is it possible to run servicestack's built-in clients on the .net client profile framework?
When i change the target framework property in the project settings to ".Net Framework Client Profile" and try to compile i get the following message: the namespace ServiceClient does not exist in the namespace servicestack.
We use servicestack services to send exception reports. We use the JsonServiceClient and feel really comfortable with it. We could change the target framework - but then we have to check all installations for the availability of the full .net framework.
Any idea how to solve this?
Thanks.
From the package contents of the latest ServiceStack.Common package there seems to be no -client version included (See Common Framework and Profile Targeting Examples under NuGet - Creating and Publishing a Package).
You should either change the target framework the full profile or pull the code from ServiceStack's GitHub Repo and try to build it for client profile yourself. The downside of this is that you will loose Nuget's awesome update features...
You could off course file an issue at GitHub for the guys maintaining ServiceStack to add a client profile version of the framework, but I guess that there's a good reason for why it's not there already.

Resources