2017-11-02 33 views
1

生成されたJHipsterアプリケーションの依存関係としてクローンng-jhipsterプロジェクトを設定したいと思います。生成されたJHipsterアプリケーションでng-jhipsterを設定する

私は、次のバージョン(jhipster情報から)使用しています:私の新しい生成JHipsterアプリケーションの場合

git version 2.15.0 
node: v6.11.5 
npm: 5.4.2 
yarn: 1.2.1 
yeoman: 2.0.0 

を、私は次のステップをやってる:
yarn global add generator-jhipster(私はv4.10.2を得る)
mkdir ~/v4.10.2
cd ~/myNewGeneratedApp
jhipster:ここで私はすべてのデフォルト(特別アンギュラ4)
yarn installが自動で選択しますアライが実行され、すべてが正常です)
次に、私はyarn startを実行し、すべてがうまく始まります。私のNG-jhipsterについては

は、私は、次の手順をやってる:
cd ~
git clone https://github.com/jhipster/ng-jhipster
cd ng-jhipster
git checkout v0.2.12今私は

(myNewGeneratedAppから "同じ" 依存関係のバージョンを使用します) ng-jhipster wikiを読んで実行します:

yarn install 
yarn run test 
yarn run build 
yarn link 

私はmyNewGeneratedApに戻りますPフォルダ:

cd ~/myNewGeneratedApp 
yarn link ng-jhipster 

だから、〜/ myNewGeneratedApp/node_modulesで、フォルダNG-jhipsterは私の地元のNG-jhipsterプロジェクトにもリンクです。私はyarn startを実行すると、私は次のエラーを持っているとき

は今:

ERROR in [at-loader] ./src/main/webapp/app/blocks/interceptor/auth-expired.interceptor.ts:7:14 
     TS2415: Class 'AuthExpiredInterceptor' incorrectly extends base class 'JhiHttpInterceptor'. 
     Types of property 'requestIntercept' are incompatible. 
     Type '(options?: RequestOptionsArgs) => RequestOptionsArgs' is not assignable to type '(options?: RequestOptionsArgs) => RequestOptionsArgs'. Two different types with this name exist, but they are unrelated. 
      Types of parameters 'options' and 'options' are incompatible. 
      Type 'RequestOptionsArgs' is not assignable to type 'RequestOptionsArgs'. Two different types with this name exist, but they are unrelated. 

ERROR in [at-loader] ./src/main/webapp/app/blocks/interceptor/auth.interceptor.ts:6:14 
     TS2415: Class 'AuthInterceptor' incorrectly extends base class 'JhiHttpInterceptor'. 
     Types of property 'requestIntercept' are incompatible. 
     Type '(options?: RequestOptionsArgs) => RequestOptionsArgs' is not assignable to type '(options?: RequestOptionsArgs) => RequestOptionsArgs'. Two different types with this name exist, but they are unrelated. 
      Types of parameters 'options' and 'options' are incompatible. 
      Type 'RequestOptionsArgs' is not assignable to type 'RequestOptionsArgs'. Two different types with this name exist, but they are unrelated. 

ERROR in [at-loader] ./src/main/webapp/app/blocks/interceptor/errorhandler.interceptor.ts:5:14 
     TS2415: Class 'ErrorHandlerInterceptor' incorrectly extends base class 'JhiHttpInterceptor'. 
     Types of property 'requestIntercept' are incompatible. 
     Type '(options?: RequestOptionsArgs) => RequestOptionsArgs' is not assignable to type '(options?: RequestOptionsArgs) => RequestOptionsArgs'. Two different types with this name exist, but they are unrelated. 
      Types of parameters 'options' and 'options' are incompatible. 
      Type 'RequestOptionsArgs' is not assignable to type 'RequestOptionsArgs'. Two different types with this name exist, but they are unrelated. 

ERROR in [at-loader] ./src/main/webapp/app/blocks/interceptor/http.provider.ts:20:9 
     TS2345: Argument of type 'XHRBackend' is not assignable to parameter of type 'ConnectionBackend'. 
     Types of property 'createConnection' are incompatible. 
     Type '(request: Request) => XHRConnection' is not assignable to type '(request: any) => Connection'. 
      Type 'XHRConnection' is not assignable to type 'Connection'. 
      Types of property 'request' are incompatible. 
       Type 'Request' is not assignable to type 'Request'. Two different types with this name exist, but they are unrelated. 
       Types of property 'headers' are incompatible. 
        Type 'Headers' is not assignable to type 'Headers'. Two different types with this name exist, but they are unrelated. 
        Types have separate declarations of a private property 'mayBeSetNormalizedName'. 

ERROR in [at-loader] ./src/main/webapp/app/blocks/interceptor/notification.interceptor.ts:6:14 
     TS2415: Class 'NotificationInterceptor' incorrectly extends base class 'JhiHttpInterceptor'. 
     Types of property 'requestIntercept' are incompatible. 
     Type '(options?: RequestOptionsArgs) => RequestOptionsArgs' is not assignable to type '(options?: RequestOptionsArgs) => RequestOptionsArgs'. Two different types with this name exist, but they are unrelated. 
      Types of parameters 'options' and 'options' are incompatible. 
      Type 'RequestOptionsArgs' is not assignable to type 'RequestOptionsArgs'. Two different types with this name exist, but they are unrelated. 
       Types of property 'headers' are incompatible. 
       Type 'Headers' is not assignable to type 'Headers'. Two different types with this name exist, but they are unrelated. 
        Types have separate declarations of a private property 'mayBeSetNormalizedName'. 

ERROR in [at-loader] ./src/main/webapp/app/shared/alert/alert-error.component.ts:25:9 
     TS90010: Type 'Subscription' is not assignable to type 'Subscription'. Two different types with this name exist, but they are unrelated. 
     Property '_parent' is protected but type 'Subscription' is not a class derived from 'Subscription'. 

ERROR in [at-loader] ./src/main/webapp/app/shared/alert/alert-error.component.ts:86:39 
     TS2345: Argument of type 'Subscription' is not assignable to parameter of type 'Subscription'. 
     Property '_parent' is protected but type 'Subscription' is not a class derived from 'Subscription'. 

私が行うことで、このステップを「元に戻す」場合:
yarn add ng-jhipster
yarn start - >すべてが正常である(実際のNPMの依存関係を使用して)

ローカルにリンクされているng-jhipsterと、NPMリポジトリから取得した糸との間にいくつかの違いがあります。 ローカルにリンクされたプロジェクト:
- node_modulesフォルダはmyNewGeneratedApp/node_modules/ng-jhipsterにあります。
- '.js'ファイルはありません。
を(typescriptですがtranspilationが実行されていない) - だから、* .TSファイルが残ってい

これは異常であるならば、私はしかし異なって(うまく機能している)NPMレポから依存と知らない(で少なくとも)上記の点。
ng-jhipsterのreleaseスクリプトも同様に実行する必要があります(?)。 (npm run ngcnpm publishの手順ですか?)
私は何かプロセスを逃しましたか?たぶん、ウィキに欠けているステップがありますか?

どうかこの問題に関連しています:ng-jhipster development creates compilation errors。 説明されている手順は私にとってはうまくいきませんでした。

ありがとうございました!

答えて

1

だから何我々はNG-jhipsterプロジェクトで行うことができます。

yarn ngc 
yarn pack 

してから生成されたJHipsterアプリケーションから次のコマンド:

git checkout -- yarn.lock 
yarn cache clean ng-jhipster 
rm -rf `yarn cache dir`/.tmp 
yarn add path/to/ng-jhipster/ng-jhipster-vX.Y.Z.tgz 
関連する問題