在生成的jhipster应用程序上设置ng jhipster
我想将克隆的ng jhipster项目配置为生成的jhipster应用程序的依赖项 我正在使用以下版本(来自jhipster信息): 对于新生成的JHipster应用程序,我将执行以下步骤:在生成的jhipster应用程序上设置ng jhipster,jhipster,Jhipster,我想将克隆的ng jhipster项目配置为生成的jhipster应用程序的依赖项 我正在使用以下版本(来自jhipster信息): 对于新生成的JHipster应用程序,我将执行以下步骤: 纱线全局添加生成器jhipster(我得到了4.10.2版) mkdir~/v4.10.2 cd~/myNewGeneratedApp jhipster:这里我选择了所有默认设置(特别是角度4) (纱线安装自动执行,一切正常) 然后我运行纱线开始,一切都开始得很好 对于我的ng jhipster,我将执行以
纱线全局添加生成器jhipster
(我得到了4.10.2版)mkdir~/v4.10.2
cd~/myNewGeneratedApp
jhipster
:这里我选择了所有默认设置(特别是角度4)(
纱线安装
自动执行,一切正常)然后我运行
纱线开始
,一切都开始得很好
对于我的ng jhipster,我将执行以下步骤:cd~
git克隆https://github.com/jhipster/ng-jhipster
cd ng jhipster
git checkout v0.2.12
(使用MyNewGenerateApp中的“相同”依赖项版本)
现在我正在阅读ng jhipster维基,我运行:
yarn install
yarn run test
yarn run build
yarn link
我返回MyNewGenerateApp文件夹:
cd ~/myNewGeneratedApp
yarn link ng-jhipster
因此,在~/myNewGeneratedApp/node_模块中,文件夹ng jhipster很好地链接到我的本地ng jhipster项目
现在,当我运行纱线启动时,出现以下错误:
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'.
如果我通过执行以下操作“还原”此步骤:
纱线添加ng jhipster
纱线开始
->一切正常(使用真正的NPM依赖项)
我注意到本地链接的ng jhipster与从NPM回购获得的Thread之间存在一些差异:
与本地链接的项目:
-node_modules文件夹存在于myNewGeneratedApp/node_modules/ng jhipster
-没有“.js”文件。(尚未执行typescript转换)
-因此仍然存在*.ts文件
我不知道这是否异常,但NPM回购协议的依赖性(运行良好)与上述各点不同(至少不同)。
可能还需要运行ng jhipster的release
脚本(?)。(对于npm运行ngc
和npm发布
步骤?
在这个过程中我错过了什么吗?也许只是维基中少了一步
它以某种方式与此问题相关:。
所描述的步骤对我不起作用
谢谢你的帮助 那么我们可以对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
请在此处查看ng 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