在构建angular-6应用程序时出现此错误,我该如何解决呢?

时间:2018-08-28 04:47:49

标签: javascript angular angular-cli angular6

**ng build --prod (error) how i can resolve this issue!**

F:\ practice \ ang-node \ frontend> ng build --prod

  

日期:2018-08-28T04:08:06.648Z哈希:61fab25db19a36ad55ca时间:   89374ms块{0} runtime.a66f828dca56eeb90e02.js(运行时)1.05 kB   [entry] [rendered]块{1} styles.78fc82606a60ff243473.css(样式)   193 kB [初始] [渲染]块{2}   polyfills.7a0e6866a34e280f48e7.js(polyfills)59.6 kB [初始]   [呈现]块{3} main.b6f6160fdfad736b2ba4.js(主要)1.18 MB   [初始] [呈现]

     ./node_modules/angular2-jwt/angular2-jwt.js模块构建中的

ERROR   失败:错误:调试失败。错误的表达。       在getJSDocTags(F:\ practice \ ang-node \ frontend \ node_modules \ @ angular-devkit \ build-optimizer \ node_modules \ typescript \ lib \ typescript.js:13197:22)       在getFirstJSDocTag(F:\ practice \ ang-node \ frontend \ node_modules \ @ angular-devkit \ build-optimizer \ node_modules \ typescript \ lib \ typescript.js:13205:24)       在Object.getJSDocTypeTag(F:\ practice \ ang-node \ frontend \ node_modules \ @ angular-devkit \ build-optimizer \ node_modules \ typescript \ lib \ typescript.js:13154:19)       在checkParenthesizedExpression(F:\ practice \ ang-node \ frontend \ node_modules \ @ angular-devkit \ build-optimizer \ node_modules \ typescript \ lib \ typescript.js:45628:56)       在checkExpressionWorker(F:\ practice \ ang-node \ frontend \ node_modules \ @ angular-devkit \ build-optimizer \ node_modules \ typescript \ lib \ typescript.js:45676:28)       在checkExpression(F:\ practice \ ang-node \ frontend \ node_modules \ @ angular-devkit \ build-optimizer \ node_modules \ typescript \ lib \ typescript.js:45609:42)       在checkBinaryLikeExpression(F:\ practice \ ang-node \ frontend \ node_modules \ @ angular-devkit \ build-optimizer \ node_modules \ typescript \ lib \ typescript.js:45155:29)       在checkBinaryExpression(F:\ practice \ ang-node \ frontend \ node_modules \ @ angular-devkit \ build-optimizer \ node_modules \ typescript \ lib \ typescript.js:45147:20)       在checkExpressionWorker(F:\ practice \ ang-node \ frontend \ node_modules \ @ angular-devkit \ build-optimizer \ node_modules \ typescript \ lib \ typescript.js:45702:28)       在checkExpression(F:\ practice \ ang-node \ frontend \ node_modules \ @ angular-devkit \ build-optimizer \ node_modules \ typescript \ lib \ typescript.js:45609:42)       在checkExpressionCached(F:\ practice \ ang-node \ frontend \ node_modules \ @ angular-devkit \ build-optimizer \ node_modules \ typescript \ lib \ typescript.js:45457:38)       在getTypeOfExpression(F:\ practice \ ang-node \ frontend \ node_modules \ @ angular-devkit \ build-optimizer \ node_modules \ typescript \ lib \ typescript.js:45577:28)       在checkDeclarationInitializer(F:\ practice \ ang-node \ frontend \ node_modules \ @ angular-devkit \ build-optimizer \ node_modules \ typescript \ lib \ typescript.js:45469:24)       在getTypeForVariableLikeDeclaration(F:\ practice \ ang-node \ frontend \ node_modules \ @ angular-devkit \ build-optimizer \ node_modules \ typescript \ lib \ typescript.js:30738:28)       在getWidenedTypeForVariableLikeDeclaration(F:\ practice \ ang-node \ frontend \ node_modules \ @ angular-devkit \ build-optimizer \ node_modules \ typescript \ lib \ typescript.js:30961:24)       在getTypeOfVariableOrParameterOrProperty(F:\ practice \ ang-node \ frontend \ node_modules \ @ angular-devkit \ build-optimizer \ node_modules \ typescript \ lib \ typescript.js:31062:28)

F:\ practice \ ang-node \ frontend> enter image description here **

1 个答案:

答案 0 :(得分:0)

angular2-jwt应该仅与Angular 2一起使用。对于Angular 6,您将需要使用支持RxJS v6 +的@auth0/angular-jwt