English 中文(简体)
ERROR in node_modules/@auth0/angular-jwt/lib/jwtoptions.token.d.ts(2,50):误差TS2304: 不详
原标题:ERROR in node_modules/@auth0/angular-jwt/lib/jwtoptions.token.d.ts(2,50): error TS2304: Cannot find name unknown

在汇编我的蜂窝项目时,我有以下错误。 我删除了我的“风气”档案,并重述了它仍然做的 t。

ERROR in node_modules/@auth0/angular-jwt/lib/jwtoptions.token.d.ts(2,50):误差TS2304: 不详。

“entergraph

package.json

{
  "name": "ArinhureWeb",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "build:ssr": "ng run ArinhureWeb:server:dev",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "6.1.10",
    "@angular/common": "6.1.10",
    "@angular/compiler": "6.1.10",
    "@angular/core": "6.1.10",
    "@angular/forms": "6.1.10",
    "@angular/http": "6.1.10",
    "@angular/platform-browser": "6.1.10",
    "@angular/platform-browser-dynamic": "6.1.10",
    "@angular/platform-server": "6.1.10",
    "@angular/router": "6.1.10",
    "@auth0/angular-jwt": "^5.0.1",
    "@nguniversal/module-map-ngfactory-loader": "6.0.0",
    "aspnet-prerendering": "^3.0.1",
    "bootstrap": "^4.1.3",
    "chart.js": "^2.9.3",
    "core-js": "^2.5.4",
    "jquery": "3.3.1",
    "popper.js": "^1.14.3",
    "rxjs": "6.0.0",
    "zone.js": "^0.8.26"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.6.0",
    "@angular/cli": "~6.0.0",
    "@angular/compiler-cli": "6.1.10",
    "@angular/language-service": "^6.0.0",
    "@types/jasmine": "~2.8.6",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~8.9.4",
    "codelyzer": "~4.2.1",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "^3.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~1.4.2",
    "karma-jasmine": "~1.1.1",
    "karma-jasmine-html-reporter": "^0.2.2",
    "typescript": "~2.7.2"
  },
  "optionalDependencies": {
    "node-sass": "^4.9.3",
    "protractor": "~5.4.0",
    "ts-node": "~5.0.1",
    "tslint": "~5.9.1"
  }
}
问题回答

我有这个问题,找到解决办法。 我目前正在使用Angular 6,并在查阅后安装了4.2版。 我有同样的错误:

fail: Microsoft.AspNetCore.SpaServices[0] node_modules/@auth0/angular-jwt/lib/jwtoptions.token.d.ts(2,50): error TS2304: Cannot find name unknown .

我宣布开会。 a. to子。

import { InjectionToken } from  @angular/core ;
export declare const JWT_OPTIONS: InjectionToken<unknown>;

身份不明的是一种新类型,在第3类中采用,Angular 6.0.9则取决于类型2.7。 此外,4.2版的@auth0/angular-jwt Dependencies以Angular 7.1+为目标,因为你可以从这一Npm警告中看到:

npm WARN @auth0/要求具备@angular/common@>的同行;=7.1.0,但没有安装。 你们必须安装同侪附属企业。

I think this package is running into issues supporting older versions of Angular. I simply downgraded to the version @auth0/[email protected] and no longer have errors.

这里是我的一揽子计划。 json:

  "dependencies": {
    "@angular/animations": "6.0.9",
    "@angular/cdk": "^6.4.7",
    "@angular/common": "6.0.9",
    "@angular/compiler": "6.0.9",
    "@angular/core": "6.0.9",
    "@angular/forms": "6.0.9",
    "@angular/http": "6.0.9",
    "@angular/material": "^6.4.7",
    "@angular/platform-browser": "6.0.9",
    "@angular/platform-browser-dynamic": "6.0.9",
    "@angular/router": "6.0.9",
    "@auth0/angular-jwt": "3.0.1",
    "@ng-idle/core": "^6.0.0-beta.3",
    "@ng-idle/keepalive": "^6.0.0-beta.3",
    "angular2-moment": "^1.9.0",
    "bootstrap": "3.3.2",
    "bootstrap-tree": "1.2.0",
    "chart.js": "2.0.2",
    "core-js": "2.4.1",
    "font-awesome": "4.7.0",
    "formvalidation": "0.6.2-dev",
    "jquery": "1.11.2",
    "jquery-match-height": "0.7.2",
    "jquery-sparkline": "2.3.2",
    "jstree": "3.3.4",
    "ngx-bootstrap": "3.0.1",
    "noty": "2.4.1",
    "pdfmake-client": "1.0.0",
    "primeicons": "1.0.0-beta.9",
    "primeng": "6.0.0",
    "rxjs": "6.0.0",
    "rxjs-compat": "6.2.2",
    "sortablejs": "1.6.0",
    "webpack": "^4.4.0",
    "zone.js": "0.8.26"
  },
  "devDependencies": {
    "@angular/cli": "6.1.4",
    "@angular/compiler-cli": "6.0.9",
    "@angular/language-service": "6.0.9",
    "@angular-devkit/build-angular": "0.6.7",
    "@angular-devkit/core": "0.5.11",
    "@types/jasmine": "2.8.3",
    "@types/jasminewd2": "2.0.2",
    "@types/node": "6.0.60",
    "codelyzer": "4.0.1",
    "jasmine-core": "2.8.0",
    "jasmine-spec-reporter": "4.2.1",
    "karma": "2.0.0",
    "karma-chrome-launcher": "2.2.0",
    "karma-cli": "1.0.1",
    "karma-coverage-istanbul-reporter": "1.2.1",
    "karma-jasmine": "1.1.0",
    "karma-jasmine-html-reporter": "0.2.2",
    "protractor": "5.1.2",
    "ts-node": "3.2.0",
    "tslint": "5.9.1",
    "typescript": "2.7.2"
  },

Error: ./node_modules/@auth0/angular-jwt/fesm2015/auth0-angular-jwt.mjs 141:15-20 Can t import the named export defer from non EcmaScript module (only default export is available)

10ia el mismo wrong al trabajarcon la edition 5.2.0 “@auth0/angular-jwt”:“5.2.0”, al parecer es un mis de conflicto entre agular y ests Dependencia

1.degrade la version de la dependencia "@auth0/angular-jwt": "5.2.0" a la "@auth0/angular-jwt": "3.0.1", 2.elimine mi pakage-loock.json y mi carpeta de nodemodule 3. reinstale mis dependenciasnpm install 4. ng serve para desplegar mi app y resolvio mi confligto





相关问题
Flex Multi Service call problem

I tried to call a service using a for loop and it seems that only the first service call seems to work. My guess is that once a service is called it needs to wait until result event until it can be ...

WinInet google maps data api receive error Invalid Token

I am trying to login to Google maps data API (get MyMaps) with wininet and delphi but always recevied response: Invalid Token. I have gotten auth toke with wininet HTTPS call. What s the problem ? ...

Generate SAML 1.1 (and possibly 2.0) assertions

I m looking for a very easy and quick way to generate some SAML assertions. This is only going to be used for testing (using SOAP UI). So I just need something that can generate a valid assertion, ...

C Programming: Preprocessor, macros as tokens

I m trying to do something that is conceptually similar to this, but can t seem to get it to work (error shown at end) any ideas? #include <stdio.h> int main( int argc , char const *argv[] ) { ...

Authenticating and tracking users in a JSON webservice

I have contact management / CRM application used in-house by our company, It is a web based app and thus uses a lot of Ajax. Most of the data is JSON, and the backend server uses PHP with MySQL as the ...

Bison/Yacc, make literal token return its own value?

Below is my rule, when i replace $2 with = my code works. I know by default all literal tokens uses their ascii value (hence why multi character token require a definition) The below doesnt work. ...

热门标签