UAA: Using JHipster blueprints vuejs to generate the µ-services gateway, I got the error when run mvnw command.
mac8088 opened this issue · 2 comments
Overview of the issue
Dear JH-VUE developers:
Using JHipster blueprints vuejs to generate the µ-services gateway, I got the error when run mvnw command.
Motivation for or Use Case
I am building some µ-services projects that following the online JHipster documentation. Now I can build the gateway successfully with the step by step questions.
Reproduce the error
But I first time to start up the project with mvnw command, the long building process will be failed with the front-end errors.
There are two kinds of errors:
TS2339: Property 'cookie' does not exist on type 'AccountService'.
TS2304: Cannot find name 'loginService'.
The mvnw logging
...
...
[INFO] ERROR in D:\uga\gateway_uaa\src\main\webapp\app\account\account.service.ts
[INFO] ./src/main/webapp/app/account/account.service.ts
[INFO] [tsl] ERROR in D:\uga\gateway_uaa\src\main\webapp\app\account\account.service.ts(12,24)
[INFO] TS2339: Property 'cookie' does not exist on type 'AccountService'.
[INFO]
[INFO] ERROR in D:\uga\gateway_uaa\src\main\webapp\app\account\account.service.ts
[INFO] ./src/main/webapp/app/account/account.service.ts
[INFO] [tsl] ERROR in D:\uga\gateway_uaa\src\main\webapp\app\account\account.service.ts(12,57)
[INFO] TS2339: Property 'cookie' does not exist on type 'AccountService'.
[INFO]
[INFO] ERROR in D:\uga\gateway_uaa\src\test\javascript\spec\app\core\home\home.component.spec.ts
[INFO] [tsl] ERROR in D:\uga\gateway_uaa\src\test\javascript\spec\app\core\home\home.component.spec.ts(22,29)
[INFO] TS2304: Cannot find name 'loginService'.
[INFO]
[INFO] ERROR in D:\uga\gateway_uaa\src\test\javascript\spec\app\core\home\home.component.spec.ts
[INFO] [tsl] ERROR in D:\uga\gateway_uaa\src\test\javascript\spec\app\core\home\home.component.spec.ts(47,12)
[INFO] TS2304: Cannot find name 'loginService'.
[INFO]
[INFO] ERROR in D:\uga\gateway_uaa\src\test\javascript\spec\app\core\jhi-navbar\jhi-navbar.component.spec.ts
[INFO] [tsl] ERROR in D:\uga\gateway_uaa\src\test\javascript\spec\app\core\jhi-navbar\jhi-navbar.component.spec.ts(35,29)
[INFO] TS2304: Cannot find name 'loginService'.
[INFO]
[INFO] ERROR in D:\uga\gateway_uaa\src\test\javascript\spec\app\core\jhi-navbar\jhi-navbar.component.spec.ts
[INFO] [tsl] ERROR in D:\uga\gateway_uaa\src\test\javascript\spec\app\core\jhi-navbar\jhi-navbar.component.spec.ts(70,12)
[INFO] TS2304: Cannot find name 'loginService'.
[INFO]
[INFO] ERROR in D:\uga\gateway_uaa\src\test\javascript\spec\app\core\jhi-navbar\jhi-navbar.component.spec.ts
[INFO] [tsl] ERROR in D:\uga\gateway_uaa\src\test\javascript\spec\app\core\jhi-navbar\jhi-navbar.component.spec.ts(81,5)
[INFO] TS2304: Cannot find name 'loginService'.
[INFO]
[INFO] ERROR in D:\uga\gateway_uaa\src\test\javascript\spec\app\core\jhi-navbar\jhi-navbar.component.spec.ts
[INFO] [tsl] ERROR in D:\uga\gateway_uaa\src\test\javascript\spec\app\core\jhi-navbar\jhi-navbar.component.spec.ts(84,12)
[INFO] TS2304: Cannot find name 'loginService'.
[INFO] Child html-webpack-plugin for "index.html":
[INFO] 1 asset
[INFO] Entrypoint undefined = index.html
[INFO] [./node_modules/html-webpack-plugin/lib/loader.js!./src/main/webapp/index.html] 6.23 KiB {0} [built]
[INFO] factory:91ms building:95ms = 186ms
[INFO] [./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 472 bytes {0} [built]
[INFO] [./node_modules/html-webpack-plugin/lib/loader.js!./src/main/webapp/index.html] 186ms -> [./node_modules/lodash/lodash.js] 812ms -> factory:12594ms building:573ms = 14165ms
[INFO] [./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 497 bytes {0} [built]
[INFO] [./node_modules/html-webpack-plugin/lib/loader.js!./src/main/webapp/index.html] 186ms -> [./node_modules/lodash/lodash.js] 812ms -> factory:12594ms building:573ms = 14165ms
[INFO] + 1 hidden module
[INFO] npm ERR! code ELIFECYCLE
[INFO] npm ERR! errno 2
[INFO] npm ERR! gateway@0.0.0 webpack: `node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js "--config" "webpack/webpack.dev.js" "--progress" "--profile"`
[INFO] npm ERR! Exit status 2
[INFO] npm ERR!
[INFO] npm ERR! Failed at the gateway@0.0.0 webpack script.
[INFO] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[INFO]
[INFO] npm ERR! A complete log of this run can be found in:
[INFO] npm ERR! C:\Users\A450588\AppData\Roaming\npm-cache\_logs\2020-03-18T05_39_37_278Z-debug.log
[INFO] npm ERR! code ELIFECYCLE
[INFO] npm ERR! errno 2
[INFO] npm ERR! gateway@0.0.0 webpack:build:main: `npm run webpack -- --config webpack/webpack.dev.js --progress --profile`
[INFO] npm ERR! Exit status 2
[INFO] npm ERR!
[INFO] npm ERR! Failed at the gateway@0.0.0 webpack:build:main script.
[INFO] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[INFO]
[INFO] npm ERR! A complete log of this run can be found in:
[INFO] npm ERR! C:\Users\A450588\AppData\Roaming\npm-cache\_logs\2020-03-18T05_39_37_333Z-debug.log
[INFO] npm ERR! code ELIFECYCLE
[INFO] npm ERR! errno 2
[INFO] npm ERR! gateway@0.0.0 webpack:build: `npm run cleanup && npm run webpack:build:main`
[INFO] npm ERR! Exit status 2
[INFO] npm ERR!
[INFO] npm ERR! Failed at the gateway@0.0.0 webpack:build script.
[INFO] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[INFO]
[INFO] npm ERR! A complete log of this run can be found in:
[INFO] npm ERR! C:\Users\A450588\AppData\Roaming\npm-cache\_logs\2020-03-18T05_39_37_383Z-debug.log
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:29 min
[INFO] Finished at: 2020-03-18T13:39:37+08:00
[INFO] ------------------------------------------------------------------------
2020-03-18T05_39_37_383Z-debug.log:
Sorry, I also enclosed the verbose NPM logging:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'D:\\uga\\gateway_uaa\\node\\node.exe',
1 verbose cli 'D:\\uga\\gateway_uaa\\node\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'webpack:build'
1 verbose cli ]
2 info using npm@6.14.2
3 info using node@v12.16.1
4 verbose run-script [ 'prewebpack:build', 'webpack:build', 'postwebpack:build' ]
5 info lifecycle gateway@0.0.0~prewebpack:build: gateway@0.0.0
6 info lifecycle gateway@0.0.0~webpack:build: gateway@0.0.0
7 verbose lifecycle gateway@0.0.0~webpack:build: unsafe-perm in lifecycle true
8 verbose lifecycle gateway@0.0.0~webpack:build: PATH: D:\uga\gateway_uaa\node\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\uga\gateway_uaa\node_modules\.bin;D:\uga\gateway_uaa\node;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;D:\flexdev\app\TortoiseGit\bin;D:\flexdev\app\TortoiseSVN\bin;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;D:\flexdev\lang\nodejs\;D:\flexdev\java\jdk11.0.6\bin;D:\flexdev\build\apache-maven-3.6.2\bin;D:\flexdev\app\git\bin;D:\flexdev\lang\python-3.7.6;D:\flexdev\lang\python-3.7.6\Scripts;D:\flexdev\lang\nodejs;C:\Users\A450588\AppData\Roaming\npm;C:\Users\A450588\AppData\Local\Microsoft\WindowsApps;D:\flexdev\util;C:\Users\A450588\AppData\Local\Programs\Fiddler;;
9 verbose lifecycle gateway@0.0.0~webpack:build: CWD: D:\uga\gateway_uaa
10 silly lifecycle gateway@0.0.0~webpack:build: Args: [ '/d /s /c', 'npm run cleanup && npm run webpack:build:main' ]
11 silly lifecycle gateway@0.0.0~webpack:build: Returned: code: 2 signal: null
12 info lifecycle gateway@0.0.0~webpack:build: Failed to exec webpack:build script
13 verbose stack Error: gateway@0.0.0 webpack:build: `npm run cleanup && npm run webpack:build:main`
13 verbose stack Exit status 2
13 verbose stack at EventEmitter.<anonymous> (D:\uga\gateway_uaa\node\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:311:20)
13 verbose stack at ChildProcess.<anonymous> (D:\uga\gateway_uaa\node\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:311:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid gateway@0.0.0
15 verbose cwd D:\uga\gateway_uaa
16 verbose Windows_NT 10.0.18363
17 verbose argv "D:\\uga\\gateway_uaa\\node\\node.exe" "D:\\uga\\gateway_uaa\\node\\node_modules\\npm\\bin\\npm-cli.js" "run" "webpack:build"
18 verbose node v12.16.1
19 verbose npm v6.14.2
20 error code ELIFECYCLE
21 error errno 2
22 error gateway@0.0.0 webpack:build: `npm run cleanup && npm run webpack:build:main`
22 error Exit status 2
23 error Failed at the gateway@0.0.0 webpack:build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]
JHipster Version(s)
The JHipster version is latest:
- JHipster 6.8.0
- jhipster-vuejs 1.7.0
JHipster configuration
JHipster info:
INFO! Using JHipster version installed locally in current project's node_modules
INFO! No custom sharedOptions found within blueprint: generator-jhipster-vuejs at D:/uga/gateway/node_modules/generator-jhipster-vuejs
INFO! Executing jhipster:info
INFO! Options: from-cli: true
Welcome to the JHipster Information Sub-Generator
##### **JHipster Version(s)**
```
gateway@0.0.0 D:\uga\gateway
`-- generator-jhipster-vuejs@1.7.0
`-- generator-jhipster@6.8.0
```
##### **JHipster configuration, a `.yo-rc.json` file generated in the root folder**
<details>
<summary>.yo-rc.json file</summary>
<pre>
{
"generator-jhipster": {
"promptValues": {
"packageName": "net.atos.ecustoms.gateway",
"nativeLanguage": "en"
},
"jhipsterVersion": "6.8.0",
"applicationType": "gateway",
"baseName": "gateway",
"packageName": "net.atos.ecustoms.gateway",
"packageFolder": "net/atos/ecustoms/gateway",
"serverPort": "8080",
"authenticationType": "uaa",
"uaaBaseName": "uaa",
"cacheProvider": "ehcache",
"enableHibernateCache": true,
"websocket": false,
"databaseType": "sql",
"devDatabaseType": "h2Disk",
"prodDatabaseType": "postgresql",
"searchEngine": false,
"messageBroker": false,
"serviceDiscoveryType": "eureka",
"buildTool": "maven",
"enableSwaggerCodegen": false,
"embeddableLaunchScript": false,
"useSass": true,
"clientPackageManager": "npm",
"clientFramework": "vue",
"clientTheme": "none",
"clientThemeVariant": "",
"creationTimestamp": 1584510007101,
"testFrameworks": [],
"jhiPrefix": "jhi",
"entitySuffix": "",
"dtoSuffix": "DTO",
"otherModules": [
{
"name": "generator-jhipster-vuejs",
"version": "1.7.0"
}
],
"enableTranslation": true,
"nativeLanguage": "en",
"languages": ["en", "zh-cn"],
"blueprints": [
{
"name": "generator-jhipster-vuejs",
"version": "1.7.0"
}
]
}
}
</pre>
</details>
##### **JDL for the Entity configuration(s) `entityName.json` files generated in the `.jhipster` directory**
<details>
<summary>JDL entity definitions</summary>
<pre>
</pre>
</details>
##### **Environment and Tools**
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.6+10, mixed mode)
git version 2.24.1.windows.2
node: v12.16.1
npm: 6.13.4
yeoman: 3.1.1
INFO! Congratulations, JHipster execution is complete!
This issue occur when I configured the authenticationType is "uaa" only.
It's normal as UAA is not supported yet.
We already have a ticket for that -> #529
And there is a PR by @Brouilles -> #580
So it will be supported soon.
That's why I'm closing this as it's a duplicated ticket