generator-jhipster: Failed to use Angular CLI with new jHipster project

Overview of the issue

With v.4.13.3 jHipster generator and a freshly generated project, Angular CLI is not working properly :

λ ng g c toto --dry-run
Your global Angular CLI version (1.6.3) is greater than your local
version (1.6.0). The local Angular CLI version is used.

To disable this warning use "ng set --global warnings.versionMismatch=false".
input.mergeMap is not a function
TypeError: input.mergeMap is not a function
    at Object.callRule (C:\WorksapaceTemp\testJhipsterCR\node_modules\@angular-devkit\schematics\src\rules\call.js:78:18)
    at SchematicImpl.call (C:\WorksapaceTemp\testJhipsterCR\node_modules\@angular-devkit\schematics\src\engine\schematic.js:35:23)
    at Promise (C:\WorksapaceTemp\testJhipsterCR\node_modules\@angular\cli\tasks\schematic-run.js:73:23)
    at new Promise (<anonymous>)
    at Class.run (C:\WorksapaceTemp\testJhipsterCR\node_modules\@angular\cli\tasks\schematic-run.js:72:16)
    at Class.run (C:\WorksapaceTemp\testJhipsterCR\node_modules\@angular\cli\commands\generate.js:152:33)
    at resolve (C:\WorksapaceTemp\testJhipsterCR\node_modules\@angular\cli\ember-cli\lib\models\command.js:261:20)
    at new Promise (<anonymous>)
    at Class.validateAndRun (C:\WorksapaceTemp\testJhipsterCR\node_modules\@angular\cli\ember-cli\lib\models\command.js:240:12)
    at Promise.resolve.then.then (C:\WorksapaceTemp\testJhipsterCR\node_modules\@angular\cli\ember-cli\lib\cli\cli.js:140:24)
Motivation for or Use Case

Angular CLI is present on the package and should be used 😃

Reproduce the error

On jHipster 4.13.3, generate monolithic application and try to use Angular CLI.

Related issues

I found tons of open bugs about that, dealing with component versions. Hard to know what to do…

Suggest a Fix
  • Update angular/cli to 1.6.3 does not work properly.
  • I fix the problem removing the component from devDependencies… Not sure it’s the best way !
JHipster Version(s)

4.13.3

JHipster configuration

jhipster info Using JHipster version installed locally in current project’s node_modules Executing jhipster:info Options: Welcome to the JHipster Information Sub-Generator

JHipster Version(s)
test-jhipster-crystal-report@0.0.0 C:\WorksapaceTemp\testJhipsterCR
`-- generator-jhipster@4.13.3

JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
  "generator-jhipster": {
    "promptValues": {
      "packageName": "com.mycompany.myapp",
      "nativeLanguage": "en"
    },
    "jhipsterVersion": "4.13.3",
    "baseName": "testJhipsterCR",
    "packageName": "com.mycompany.myapp",
    "packageFolder": "com/mycompany/myapp",
    "serverPort": "8080",
    "authenticationType": "jwt",
    "cacheProvider": "ehcache",
    "enableHibernateCache": true,
    "websocket": false,
    "databaseType": "sql",
    "devDatabaseType": "h2Disk",
    "prodDatabaseType": "mysql",
    "searchEngine": false,
    "messageBroker": false,
    "serviceDiscoveryType": false,
    "buildTool": "maven",
    "enableSocialSignIn": false,
    "enableSwaggerCodegen": false,    "jwtSecretKey": "replaced-by-jhipster-info",
    "clientFramework": "angularX",
    "useSass": false,
    "clientPackageManager": "yarn",
    "applicationType": "monolith",
    "testFrameworks": [],
    "jhiPrefix": "jhi",
    "enableTranslation": true,
    "nativeLanguage": "en",
    "languages": [
      "en",
      "fr"
    ]
  }
}
JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions




Environment and Tools

java version “1.8.0_152” Java™ SE Runtime Environment (build 1.8.0_152-b16) Java HotSpot™ 64-Bit Server VM (build 25.152-b16, mixed mode)

git version 2.15.1.windows.2

node: v8.9.3

npm: 5.5.1

yeoman: 2.0.0

yarn: 1.3.2

Docker version 17.10.0-ce, build f4ffd25

docker-compose version 1.16.1, build 6d1ac219

Congratulations, JHipster execution is complete!

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

None

Browsers and Operating System

None

  • Checking this box is mandatory (this is just to show you read everything)

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 23 (19 by maintainers)

Most upvoted comments

As usual with open source: when it’s ready, probably before a COVID-19 vaccine. 😉

This is done on main branch and will available in release 7

@deepu105 No offense, but just for the record: angular/cli builds are super rock solid. I use it for several rather large projects and I don’t regret it at any time. I do not see any good reason to mess around yourself with the complex build topic. Also it seems difficult to stay on top of the latest angular features… The cli takes care of all of theses points (just my personal opinion)