mshima / generator-jhipster-tenantview

Customization for tenancy and multi-tenancy
9 stars 3 forks source link

Property 'tenant' is missing in type '{ firstName: string; ... #31

Closed shwabnitz closed 4 years ago

shwabnitz commented 4 years ago

Same environment as in #23 except tenantview version 0.4.1. Issue exists also in 0.4.0.

Chosen "Tenant" as tenant name, same issue with tenant name standard.

✖ Template: package.json
✖ Target: /("typescript": "[\w.]*",)(.*),(\n\s*"webdriver-manager": "[\w.]*".*"generator-jhipster": "[\w.]*")/s
✖ Match:
✖ null
✖ Body:
✖ {
  "name": "multi-2",
  "version": "0.0.1-SNAPSHOT",
  "description": "Description for multi2",
  "private": true,
  "license": "UNLICENSED",
  "cacheDirectories": [
    "node_modules"
  ],
  "dependencies": {
    "@angular/common": "8.2.14",
    "@angular/compiler": "8.2.14",
    "@angular/core": "8.2.14",
    "@angular/forms": "8.2.14",
    "@angular/platform-browser": "8.2.14",
    "@angular/platform-browser-dynamic": "8.2.14",
    "@angular/router": "8.2.14",
    "@fortawesome/angular-fontawesome": "0.5.0",
    "@fortawesome/fontawesome-svg-core": "1.2.26",
    "@fortawesome/free-solid-svg-icons": "5.12.0",
    "@ng-bootstrap/ng-bootstrap": "5.1.4",
    "@ngx-translate/core": "11.0.1",
    "@ngx-translate/http-loader": "4.0.0",
    "bootstrap": "4.4.1",
    "core-js": "3.5.0",
    "moment": "2.24.0",
    "ng-jhipster": "0.11.5",
    "ngx-cookie": "4.0.2",
    "ngx-infinite-scroll": "8.0.1",
    "ngx-webstorage": "4.0.1",
    "rxjs": "6.5.3",
    "swagger-ui-dist": "3.24.3",
    "tslib": "1.10.0",
    "zone.js": "0.10.2"
  },
  "devDependencies": {
    "@angular/cli": "8.3.20",
    "@angular/compiler-cli": "8.2.14",
    "@ngtools/webpack": "8.3.20",
    "@types/jest": "24.0.23",
    "@types/node": "12.12.17",
    "@typescript-eslint/eslint-plugin": "2.11.0",
    "@typescript-eslint/eslint-plugin-tslint": "2.11.0",
    "@typescript-eslint/parser": "2.11.0",
    "angular2-template-loader": "0.6.2",
    "autoprefixer": "9.7.3",
    "base-href-webpack-plugin": "2.0.0",
    "browser-sync": "2.26.7",
    "browser-sync-webpack-plugin": "2.2.2",
    "cache-loader": "4.1.0",
    "codelyzer": "5.2.0",
    "copy-webpack-plugin": "5.1.1",
    "css-loader": "3.3.2",
    "eslint": "6.7.2",
    "eslint-config-jhipster": "0.0.1",
    "eslint-config-prettier": "6.7.0",
    "eslint-loader": "3.0.3",
    "file-loader": "5.0.2",
    "fork-ts-checker-webpack-plugin": "3.1.1",
    "friendly-errors-webpack-plugin": "1.7.0",
    "html-loader": "0.5.5",
    "html-webpack-plugin": "3.2.0",
    "husky": "3.1.0",
    "jest": "24.9.0",
    "jest-date-mock": "1.0.7",
    "jest-junit": "10.0.0",
    "jest-preset-angular": "8.0.0",
    "jest-sonar-reporter": "2.0.0",
    "lint-staged": "8.2.1",
    "mini-css-extract-plugin": "0.8.0",
    "moment-locales-webpack-plugin": "1.1.2",
    "optimize-css-assets-webpack-plugin": "5.0.3",
    "postcss-loader": "3.0.0",
    "prettier": "1.19.1",
    "reflect-metadata": "0.1.13",
    "rimraf": "3.0.0",
    "sass": "1.23.7",
    "sass-loader": "8.0.0",
    "simple-progress-webpack-plugin": "1.1.2",
    "style-loader": "1.0.1",
    "terser-webpack-plugin": "2.3.0",
    "thread-loader": "2.1.3",
    "to-string-loader": "1.1.6",
    "ts-loader": "6.2.1",
    "tslint": "5.20.1",
    "typescript": "3.4.5",
    "generator-jhipster-tenantview": "0.4.1",
    "@openapitools/openapi-generator-cli": "0.0.14-4.0.2",
    "webpack": "4.41.2",
    "webpack-cli": "3.3.10",
    "webpack-dev-server": "3.9.0",
    "webpack-merge": "4.2.2",
    "webpack-notifier": "1.8.0",
    "webpack-visualizer-plugin": "0.1.11",
    "workbox-webpack-plugin": "4.3.1",
    "write-file-webpack-plugin": "4.5.1"
  },
  "peerDependencies": {
    "generator-jhipster": "6.6.0"
  },
  "engines": {
    "node": ">=8.9.0"
  },
  "scripts": {
    "prettier:format": "prettier --write \"{,src/**/}*.{md,json,ts,css,scss,yml}\"",
    "lint": "eslint . --ext .js,.ts",
    "lint:fix": "npm run lint -- --fix",
    "ngc": "ngc -p tsconfig-aot.json",
    "cleanup": "rimraf build/resources/main/static/ build/resources/main/aot",
    "clean-www": "rimraf build/resources/main/static/app/{src,build/}",
    "start": "npm run webpack:dev",
    "start-tls": "npm run webpack:dev -- --env.tls",
    "serve": "npm run start",
    "build": "npm run webpack:prod",
    "test": "npm run lint && jest --coverage --logHeapUsage -w=2 --config src/test/javascript/jest.conf.js",
    "test:watch": "npm run test -- --watch",
    "webpack:dev": "npm run webpack-dev-server -- --config webpack/webpack.dev.js --inline --hot --port=9060 --watch-content-base --env.stats=minimal",
    "webpack:dev-verbose": "npm run webpack-dev-server -- --config webpack/webpack.dev.js --inline --hot --port=9060 --watch-content-base --profile --progress --env.stats=normal",
    "webpack:build:main": "npm run webpack -- --config webpack/webpack.dev.js --env.stats=minimal",
    "webpack:build": "npm run cleanup && npm run webpack:build:main",
    "webpack:prod:main": "npm run webpack -- --config webpack/webpack.prod.js --profile",
    "webpack:prod": "npm run cleanup && npm run webpack:prod:main && npm run clean-www",
    "webpack:test": "npm run test",
    "webpack-dev-server": "node --max_old_space_size=4096 node_modules/webpack-dev-server/bin/webpack-dev-server.js",
    "webpack": "node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js"
  },
  "jestSonar": {
    "reportPath": "build/test-results/jest",
    "reportFile": "TESTS-results-sonar.xml"
  }
}

✖ Error ignored

Further down:

 ERROR  Failed to compile with 1 errors                                                                                                                                                                                                 7:57:05 PM

 error  in <homedir>/data/dev/projects/multi2/src/test/javascript/spec/app/account/settings/settings.component.spec.ts

ERROR in <homedir>/data/dev/projects/multi2/src/test/javascript/spec/app/account/settings/settings.component.spec.ts(16,11):
TS2741: Property 'tenant' is missing in type '{ firstName: string; lastName: string; activated: true; email: string; langKey: string; login: string; authorities: never[]; imageUrl: string; }' but required in type 'Account'.

   599 modules

ERROR in <homedir>/data/dev/projects/multi2/src/test/javascript/spec/app/account/settings/settings.component.spec.ts
ERROR in <homedir>/data/dev/projects/multi2/src/test/javascript/spec/app/account/settings/settings.component.spec.ts(16,11):
TS2741: Property 'tenant' is missing in type '{ firstName: string; lastName: string; activated: true; email: string; langKey: string; login: string; authorities: never[]; imageUrl: string; }' but required in type 'Account'.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! multi-2@0.0.1-SNAPSHOT webpack: `node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js "--config" "webpack/webpack.dev.js" "--env.stats=minimal"`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the multi-2@0.0.1-SNAPSHOT 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!     <homedir>/.npm/_logs/2020-02-11T18_57_05_950Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! multi-2@0.0.1-SNAPSHOT webpack:build:main: `npm run webpack -- --config webpack/webpack.dev.js --env.stats=minimal`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the multi-2@0.0.1-SNAPSHOT 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!     <homedir>/.npm/_logs/2020-02-11T18_57_05_964Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! multi-2@0.0.1-SNAPSHOT webpack:build: `npm run cleanup && npm run webpack:build:main`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the multi-2@0.0.1-SNAPSHOT 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!     <homedir>/.npm/_logs/2020-02-11T18_57_05_976Z-debug.log
INFO! Congratulations, JHipster execution is complete!
shwabnitz commented 4 years ago

Just tested with jhipster 6.7.0: same issue.

shwabnitz commented 4 years ago

Same terminal as with the test yesterday on jhipster 6.7.0:

npm install -g mshima/generator-jhipster-tenantview#master
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/error
npm ERR! 404 
npm ERR! 404  'error@^7.0.2' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'yeoman-generator'
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

Is that my fault?