Skip to content
This repository has been archived by the owner on Mar 21, 2021. It is now read-only.

problem in jhipster-vuejs installation #448

Closed
fahmimrabti10 opened this issue Sep 6, 2019 · 21 comments
Closed

problem in jhipster-vuejs installation #448

fahmimrabti10 opened this issue Sep 6, 2019 · 21 comments

Comments

@fahmimrabti10
Copy link

fahmimrabti10 commented Sep 6, 2019

Overview of the issue
When compiling a gateway application with jhipster-vuejs and jhipster 6.2 this was happened

Capture1

i fixed this problem by the change of the version of the jhipster-dependencies from 3.0.5 to 3.0.3 but when i tried to recompile the app this error comes out

Capture

this is the error message that happens from npm run webpack:build

[./src/main/webapp/content/scss/global.scss] 204ms -> factory:2650ms building:8023ms = 10877ms

[./src/main/webapp/app/account/account.service.ts] 3.18 KiB {app} {main} [built]
[./src/main/webapp/app/main.ts] 2847ms -> factory:594ms building:4646ms dependencies:1437ms = 9524ms
[./src/main/webapp/app/account/activate/activate.service.ts] 352 bytes {app} {main} [built]
[./src/main/webapp/app/main.ts] 2847ms -> factory:594ms building:4646ms dependencies:1437ms = 9524ms
[./src/main/webapp/app/account/login.service.ts] 407 bytes {app} {main} [built]
[./src/main/webapp/app/main.ts] 2847ms -> factory:594ms building:4646ms dependencies:1437ms = 9524ms
[./src/main/webapp/app/account/register/register.service.ts] 325 bytes {app} {main} [built]
[./src/main/webapp/app/main.ts] 2847ms -> factory:594ms building:4646ms dependencies:1437ms = 9524ms
[./src/main/webapp/app/admin/audits/audits.service.ts] 846 bytes {app} {main} [built]
[./src/main/webapp/app/main.ts] 2847ms -> factory:594ms building:4646ms dependencies:1437ms = 9524ms
[./src/main/webapp/app/admin/configuration/configuration.service.ts] 2.75 KiB {app} {main} [built]
[./src/main/webapp/app/main.ts] 2847ms -> factory:594ms building:4646ms dependencies:1437ms = 9524ms
[./src/main/webapp/app/admin/gateway/gateway.service.ts] 426 bytes {app} {main} [built]
[./src/main/webapp/app/main.ts] 2847ms -> factory:594ms building:4646ms dependencies:1437ms = 9524ms
[./src/main/webapp/app/admin/health/health.service.ts] 3.91 KiB {app} {main} [built]
[./src/main/webapp/app/main.ts] 2847ms -> factory:594ms building:4646ms dependencies:1437ms = 9524ms
[./src/main/webapp/app/admin/logs/logs.service.ts] 776 bytes {app} {main} [built]
[./src/main/webapp/app/main.ts] 2847ms -> factory:594ms building:4646ms dependencies:1437ms = 9524ms
[./src/main/webapp/app/admin/metrics/metrics.service.ts] 457 bytes {app} {main} [built]
[./src/main/webapp/app/main.ts] 2847ms -> factory:594ms building:4646ms dependencies:1437ms = 9524ms
[./src/main/webapp/app/admin/user-management/user-management.service.ts] 1.03 KiB {app} {main} [built]
[./src/main/webapp/app/main.ts] 2847ms -> factory:594ms building:4646ms dependencies:1437ms = 9524ms
[./src/main/webapp/app/app.vue] 1.05 KiB {app} {main} [built]
[./src/main/webapp/app/main.ts] 2847ms -> factory:594ms building:4646ms dependencies:1437ms = 9524ms
[./src/main/webapp/app/main.ts] 3.69 KiB {app} {main} [built]
factory:75ms building:2772ms = 2847ms
[./src/main/webapp/content/scss/global.scss] 1.41 KiB {global} [built]
factory:192ms building:12ms = 204ms
+ 549 hidden modules

ERROR in D:\vue\gateway\src\test\javascript\spec\app\core\home\home.component.spec.ts
[tsl] ERROR in D:\vue\gateway\src\test\javascript\spec\app\core\home\home.component.spec.ts(22,29)
TS2304: Cannot find name 'loginService'.

ERROR in D:\vue\gateway\src\test\javascript\spec\app\core\home\home.component.spec.ts
[tsl] ERROR in D:\vue\gateway\src\test\javascript\spec\app\core\home\home.component.spec.ts(47,12)
TS2304: Cannot find name 'loginService'.

ERROR in D:\vue\gateway\src\test\javascript\spec\app\core\jhi-navbar\jhi-navbar.component.spec.ts
[tsl] ERROR in D:\vue\gateway\src\test\javascript\spec\app\core\jhi-navbar\jhi-navbar.component.spec.ts(35,29)
TS2304: Cannot find name 'loginService'.

ERROR in D:\vue\gateway\src\test\javascript\spec\app\core\jhi-navbar\jhi-navbar.component.spec.ts
[tsl] ERROR in D:\vue\gateway\src\test\javascript\spec\app\core\jhi-navbar\jhi-navbar.component.spec.ts(70,12)
TS2304: Cannot find name 'loginService'.

ERROR in D:\vue\gateway\src\test\javascript\spec\app\core\jhi-navbar\jhi-navbar.component.spec.ts
[tsl] ERROR in D:\vue\gateway\src\test\javascript\spec\app\core\jhi-navbar\jhi-navbar.component.spec.ts(81,5)
TS2304: Cannot find name 'loginService'.

ERROR in D:\vue\gateway\src\test\javascript\spec\app\core\jhi-navbar\jhi-navbar.component.spec.ts
[tsl] ERROR in D:\vue\gateway\src\test\javascript\spec\app\core\jhi-navbar\jhi-navbar.component.spec.ts(84,12)
TS2304: Cannot find name 'loginService'.
Child html-webpack-plugin for "index.html":
1 asset
Entrypoint undefined = index.html
[./node_modules/html-webpack-plugin/lib/loader.js!./src/main/webapp/index.html] 6.23 KiB {0} [built]
factory:53ms building:23ms = 76ms
[./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 472 bytes {0} [built]
[./node_modules/html-webpack-plugin/lib/loader.js!./src/main/webapp/index.html] 76ms -> [./node_modules/lodash/lodash.js] 9189ms -> factory:33ms building:72ms = 9370ms
[./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 497 bytes {0} [built]
[./node_modules/html-webpack-plugin/lib/loader.js!./src/main/webapp/index.html] 76ms -> [./node_modules/lodash/lodash.js] 9189ms -> factory:33ms building:72ms = 9370ms
+ 1 hidden module
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! otc-gateway@0.0.0 webpack: node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js "--config" "webpack/webpack.dev.js" "--progress" "--profile"
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the otc-gateway@0.0.0 webpack script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\fahmi.mrabti\AppData\Roaming\npm-cache_logs\2019-09-07T09_29_28_471Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! otc-gateway@0.0.0 webpack:build:main: npm run webpack -- --config webpack/webpack.dev.js --progress --profile
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the otc-gateway@0.0.0 webpack:build:main script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\fahmi.mrabti\AppData\Roaming\npm-cache_logs\2019-09-07T09_29_28_510Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! otc-gateway@0.0.0 webpack:build: npm run cleanup && npm run webpack:build:main
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the otc-gateway@0.0.0 webpack:build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\fahmi.mrabti\AppData\Roaming\npm-cache_logs\2019-09-07T09_29_28_540Z-debug.log

@fahmimrabti10
Copy link
Author

i have created gateway application with vuejs in front by using jhipster-vuejs and jhipster 6.2, the application was succefuly generated but when i tried to run it with mvnw this error comes up.

@ruddell
Copy link
Member

ruddell commented Sep 7, 2019

Can you please fill out the issue template? Also, could you add the error message that happens from npm run webpack:build? It looks like that is the failing command.

@fahmimrabti10
Copy link
Author

i fixed the problem, but i can't login with admin or user
Capture2

@gmarziou
Copy link

gmarziou commented Sep 8, 2019

@fahmimrabti10 this is a different problem. Because you haven't filled the issue template, we have no idea of your configuration and cannot help you. Could you please execute jhipster info in your project folder and paste its output here?

@fahmimrabti10
Copy link
Author

D:\vue\gateway>jhipster info
INFO! Using JHipster version installed globally
INFO! Executing jhipster:info
INFO! Options: from-cli: true
Welcome to the JHipster Information Sub-Generator

JHipster Version(s)
otc-gateway@0.0.0 D:\vue\gateway
`-- generator-jhipster-vuejs@1.1.0 -> D:\vue\jhipster-vuejs
  `-- generator-jhipster@6.2.0

JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
  "generator-jhipster": {
    "promptValues": {
      "packageName": "com.otc.gateway",
      "nativeLanguage": "fr"
    },
    "jhipsterVersion": "6.2.0",
    "applicationType": "gateway",
    "baseName": "otcGateway",
    "packageName": "com.otc.gateway",
    "packageFolder": "com/otc/gateway",
    "serverPort": "8090",
    "authenticationType": "uaa",
    "uaaBaseName": "otcuaa",
    "cacheProvider": "ehcache",
    "enableHibernateCache": false,
    "websocket": false,
    "databaseType": "mongodb",
    "devDatabaseType": "mongodb",
    "prodDatabaseType": "mongodb",
    "searchEngine": false,
    "messageBroker": false,
    "serviceDiscoveryType": "eureka",
    "buildTool": "maven",
    "enableSwaggerCodegen": false,
    "embeddableLaunchScript": false,
    "testFrameworks": [],
    "jhiPrefix": "jhi",
    "entitySuffix": "",
    "dtoSuffix": "DTO",
    "otherModules": [
      {
        "name": "generator-jhipster-vuejs",
        "version": "1.1.0"
      }
    ],
    "enableTranslation": true,
    "clientPackageManager": "npm",
    "nativeLanguage": "fr",
    "languages": ["fr"],
    "blueprints": [
      {
        "name": "generator-jhipster-vuejs",
        "version": "1.1.0"
      }
    ]
  },
  "generator-jhipster-vuejs": {
    "jhipsterVersion": "6.2.0",
    "applicationType": "gateway",
    "baseName": "otcGateway",
    "useSass": true,
    "clientPackageManager": "npm",
    "clientFramework": "vue",
    "clientTheme": "none",
    "clientThemeVariant": ""
  }
}
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_221"
Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)

git version 2.22.0.windows.1

node: v10.16.2

npm: 6.10.2

yeoman: 3.1.0

INFO! Congratulations, JHipster execution is complete!

@gmarziou
Copy link

gmarziou commented Sep 8, 2019

OK, did you start your uaa server before trying to authenticate on gateway?

@fahmimrabti10
Copy link
Author

yes i did

@gmarziou
Copy link

gmarziou commented Sep 8, 2019

How exactly did you start your gateway? Did you start both java and webpack?
Have you looked in Chrome dev tools if there was an error in console or network tab?

@fahmimrabti10
Copy link
Author

Capture4

this error comes out when i run npm start

@gmarziou
Copy link

gmarziou commented Sep 8, 2019

It's normal you did not start the java backend (port 8090), check your gateway's README.md

@fahmimrabti10
Copy link
Author

i start the java backend and i still not able to login

@gmarziou
Copy link

gmarziou commented Sep 8, 2019

How did you start it? Any error in browser's console or in shell?
Did you start the JHipster registry too?

is this your first JHipster project?

@fahmimrabti10
Copy link
Author

i start both registry and uaa, there is no error in the shell.
yes this is my first jhipster project.

@gmarziou
Copy link

gmarziou commented Sep 8, 2019

Starting with a microservices architecture for your first JHipster project is probably looking for trouble and learning the hard way. Why not simply starting with a monolith?

@fahmimrabti10
Copy link
Author

i try a microservices architecture with another gateway genrated with angular and everything goes well, problems come out when i decied to work with vuejs.

@ruddell
Copy link
Member

ruddell commented Sep 8, 2019

I think the issue here is that the UAA auth type has not been implemented for jhipster-vuejs

@fahmimrabti10
Copy link
Author

should i regenerate the uaa with vuejs?

@lajostruszek
Copy link

I have the same problem with UAA and vujs
"the UAA auth type has not been implemented for jhipster-vuejs"
Is there any plan for the implementation

@hdurix
Copy link
Member

hdurix commented Dec 27, 2019

Hi @lajostruszek I don't think there is currently any plan for implementing this feature in this Vue.js blueprint.

@pascalgrimaud
Copy link
Member

Closing this ticket and I think the original issue is resolved

@gaetandezeiraud
Copy link

@fahmimrabti10 How have you fix this error Cannot find name 'loginService'.?
Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants