Generator-jhipster: Issues with options "client" and/or "--skip-server"

Created on 10 May 2018  Â·  18Comments  Â·  Source: jhipster/generator-jhipster

I want to separate client and server/gateway, so I used commands "jhipster client" and "jhipster --skip-server", both commands threw different errors.

For "jhipster client"

[./src/main/webapp/manifest.webapp] ./src/main/webapp/manifest.webapp 61 bytes {1} [built]
[] -> factory:226ms dependencies:4ms building:885ms = 1115ms
+ 667 hidden modules

ERROR in [at-loader] ./src/main/webapp/app/blocks/interceptor/auth-expired.interceptor.ts:6:14
TS2420: Class 'AuthExpiredInterceptor' incorrectly implements interface 'HttpInterceptor'.
Property 'intercept' is missing in type 'AuthExpiredInterceptor'.

ERROR in [at-loader] ./src/main/webapp/app/shared/login/login.service.ts:12:37
TS2304: Cannot find name 'AuthServerProvider'.

ERROR in [at-loader] ./src/main/webapp/app/shared/shared.module.ts:8:5
TS2305: Module '"/Users/sdharmadhikari/Projects/verient/vendor-handling/vendor-portal-client/src/main/webapp/app/shared/index"' has no exported member 'AuthServerProvider'.
error An unexpected error occurred: "Command failed.
Exit code: 2

And For "jhipster --skip-server" command,

? What is the base name of your application? vPortalClient
events.js:165
throw er; // Unhandled 'error' event
^

Error: ERROR! When using skip-server flag, you must pass a database option and authentication type using --db and --auth flags
at Environment.error (/Users/sdharmadhikari/.config/yarn/global/node_modules/yeoman-environment/lib/environment.js:157:40)
at module.exports.error (/Users/sdharmadhikari/.config/yarn/global/node_modules/generator-jhipster/generators/generator-base.js:2064:18)
at module.exports.validateSkipServer (/Users/sdharmadhikari/.config/yarn/global/node_modules/generator-jhipster/generators/client/index.js:201:26)
at Object. (/Users/sdharmadhikari/.config/yarn/global/node_modules/yeoman-generator/lib/index.js:399:25)
at /Users/sdharmadhikari/.config/yarn/global/node_modules/run-async/index.js:25:25
at new Promise ()
at /Users/sdharmadhikari/.config/yarn/global/node_modules/run-async/index.js:24:19
at self.env.runLoop.add.completed (/Users/sdharmadhikari/.config/yarn/global/node_modules/yeoman-generator/lib/index.js:400:11)
at runCallback (timers.js:763:18)
at tryOnImmediate (timers.js:734:5)
Emitted 'error' event at:
at Immediate.setImmediate (/Users/sdharmadhikari/.config/yarn/global/node_modules/yeoman-generator/lib/index.js:406:18)
at runCallback (timers.js:763:18)
at tryOnImmediate (timers.js:734:5)
at processImmediate (timers.js:716:5)

JHipster Version(s)

Using JHipster version installed globally
4.14.1

JHipster configuration

It is failing while creating the project, so no configuration of Jhipster available.

Entity configuration(s) entityName.json files generated in the .jhipster directory

None

Browsers and Operating System

I am running MacOs Sierra

Thank you !

Most helpful comment

I'm using postgres for db and JWT for auth, so for the client side:

"jhipster --skip-server --db=sql --auth=jwt"

and if you want to use websockets you add: "--websocket=spring-websocket"

All 18 comments

Forgot to mention. My main intention is deploying UI app and server separately. So do you have a hook for server URL? I tried "jhipster server" and has other issue which I will submit separate issue.

Jhipster is amazing !

  • For jhipster client I don't remember you could use that sub-generator directly, for me it is always composed into the main generator. Could you point me to where you found the documentation on this? I think that's an error, and you should rather use the jhipster --skip-server, which you also did (of course)
  • For jhipster --skip-server have a look at the error message, there are some other arguments you must pass (the database and authentication type). Flags are for "advanced use" and are a bit harder to use than when using the prompts directly, and unfortunately the error system provided by Yeoman isn't very user-friendly as you got a stack trace (which is a bit frightening, when it's just a validation error like here)

Julien is right. Technically both Jhipster client and skip server does the
same thing but its advisable to use skip server so that everything is
composed properly. In either case you need to pass those arguments since
its an advanced use case. You could run 'jhipster client --h' to see all
the available flags and description

On Thu, 10 May 2018, 10:46 am Julien Dubois, notifications@github.com
wrote:

>

  • For jhipster client I don't remember you could use that
    sub-generator directly, for me it is always composed into the main
    generator. Could you point me to where you found the documentation on this?
    I think that's an error, and you should rather use the jhipster
    --skip-server, which you also did (of course)
  • For jhipster --skip-server have a look at the error message, there
    are some other arguments you must pass (the database and authentication
    type). Flags are for "advanced use" and are a bit harder to use than when
    using the prompts directly, and unfortunately the error system provided by
    Yeoman isn't very user-friendly as you got a stack trace (which is a bit
    frightening, when it's just a validation error like here)

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/7592#issuecomment-387954343,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF_qfEN6HGMzXfHEKzN1x-ZerxA6Oks5tw80ugaJpZM4T5G5_
.

I'm closing this as its a validation error. Do let us know if you find any issues after passing proper arguments

@jdubois @deepu105 Here is documentation on jhipster.com under section "Creating new Application". It says both options are same. If those are different, it is better to have documentation what each option does. May be something really useful hidden under it.

--skip-client - Skip the client-side application generation, so you only have the Spring Boot back-end code generated (Default: false). This is same as running server sub-generator with jhipster server.
--skip-server - Skip the server-side application generation, so you only have the front-end code generated (Default: false). This is same as running client sub-generator with jhipster client.

I have no idea what jhipster.com is but I would strongly advise not going there. Like jhipster.cn or jhipster.ru - those people are squatting our name, I have never had any contact with them (and I tried), and I'm guessing they distribute malware (otherwise I don't see the point of translating the site without contacting us)

Then indeed it looks there is an issue in our documentation

@jdubois @deepu105 Also there is a vague "Tip" at the end of the page, which says,

Tips
If you are an advanced user you can use our client and server sub-generators by running jhipster client --[options] and jhipster server --[options]. Run the above sub-generators with --help flag to view all the options that can be passed.

You can also use the Yeoman command-line options, like --force to automatically overwrite existing files. So if you want to regenerate your whole application, including its entities, you can run jhipster --force --with-entities

Also, when I see options with --help flag, there are many options are not explained anywhere. It says, --db is mandatory, but I did not see any documentation what kind of db it is asking for ? If this is client only application, is it asking for any db hosted inside browser ? Like indexDb, SqlLite etc ? Agains, feels there is something great hidden inside these options, but no documentation.

@jdubois Thanks for adding this to the milestone. I am shocked to see jhipster.com is not related to you guys and it is a ripoff ! Just to make sure, I compared the documentation on your site jhipster.tech (at least this is correct!) and it is same. So this item in the milestone stands good. Also, I can help you for documentation if you send me the details. I am new to jhipster, so can not code for you guys yet.

Thanks @sdharmadhikari - and yes there are a lot of people doing "strange" things around JHipster... It's easy to mess up with an OSS project, we have limited resources and no will to fight any legal battle.

If you want to help on documentation, please go ahead, there are so much stuff to improve there! The source of the website is at https://github.com/jhipster/jhipster.github.io - if you modify anything, just send a pull request, it's as easy as that!

@sdharmadhikari why do you think the tip is vague? it clearly says what the sub gens does and asks you to use --help to see flags required. And its intended for advanced users who knows JHipster well. Now if you are willing to improve the docs I would suggest adding some info for the flags themselves. If you do a PR hit me up and I will review it

jhipster.com is iFraming us and serving ad banners on top. Its bad for our SEO and reputation I guess. I dont know if there is any way we can take it down. Atleast the RU and CN ones are providing unofficial translations which might be helpful to some people, but it would have been nice if they collaborate with us and provide it us official translations.

  • I just killed jhipster.com see https://twitter.com/juliendubois/status/995276151961669632 (and I have some other tricks if they go on)
  • for the .ru and .cn I have no idea what they are doing, and I already tried to contact them. So it's definitely weird, and that's why I wouldn't trust them.

Now we have enough money on OpenCollective I'll also soon start to prepare for legal actions, but we'll talk about that at JHipster Conf when the team is here.

@deepu105 I thought the tip was vague because I did not expect there would be no information on options as well. For example, --db option, what it should be used for. Looks like "advanced users" means the one who know the source code already or would be ready to explore the code right away. Thanks.

@jdubois I was showing my teammates not to use jhipster.com and it was already gone ! Thank you !

You should be seeing some info when you run jhipster client --help

On Tue, 15 May 2018, 4:41 am Sudhir Dharmadhikari, notifications@github.com
wrote:

@deepu105 https://github.com/deepu105 I thought the tip was vague
because I did not expect there would be no information on options as well.
For example, --db option, what it should be used for. Looks like "advanced
users" means the one who know the source code already or would be ready to
explore the code right away. Thanks.

@jdubois https://github.com/jdubois I was showing my teammates not to
use jhipster.com and it was already gone ! Thank you !

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/7592#issuecomment-388985811,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF7PiVQpFIjcgyodS787m0I0YThUyks5tygghgaJpZM4T5G5_
.

@sdharmadhikari Did you get skip-server to work? how did you run the command?
I'm having this issue now https://github.com/jhipster/generator-jhipster/issues/7746
Thanks!

I'm using postgres for db and JWT for auth, so for the client side:

"jhipster --skip-server --db=sql --auth=jwt"

and if you want to use websockets you add: "--websocket=spring-websocket"

I'm using postgres for db and JWT for auth, so for the client side:

"jhipster --skip-server --db=sql --auth=jwt"

and if you want to use websockets you add: "--websocket=spring-websocket"

What are other possible values for --db and --auth?

What are other possible values for --db and --auth?

See https://www.jhipster.tech/jdl/applications#available-application-configuration-options (respectively databaseType and authenticationType)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hdurix picture hdurix  Â·  58Comments

loydjayme25 picture loydjayme25  Â·  71Comments

deepu105 picture deepu105  Â·  114Comments

deepu105 picture deepu105  Â·  75Comments

deepu105 picture deepu105  Â·  53Comments