Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't resolve '@auth0/auth0-spa-js/dist/typings/Auth0Client' #63

Closed
indrajitbnikam opened this issue Jul 11, 2019 · 1 comment
Closed

Comments

@indrajitbnikam
Copy link

indrajitbnikam commented Jul 11, 2019

Hi,

I was reading the online documentation on how to use @auth0-spa-js with angular on the official website. So I installed it.

but have been getting this error:

ERROR in ./src/app/services/auth.service.ts
Module not found: Error: Can't resolve '@auth0/auth0-spa-js/dist/typings/Auth0Client' in

I'm not sure why this is happening? so I tried your sample project on GitHub. surprisingly enough it works.

I'm not sure what to do now.

My package.json content:

"dependencies": {},
"devDependencies": {
"@angular-devkit/schematics": "^8.1.1",
"@angular/animations": "^8.1.1",
"@angular/cdk": "^8.0.2",
"@angular/cli": "~8.0.2",
"@angular/common": "^8.1.1",
"@angular/compiler": "^8.1.1",
"@angular/core": "^8.1.1",
"@angular/flex-layout": "^8.0.0-beta.26",
"@angular/forms": "^8.1.1",
"@angular/material": "^8.0.2",
"@angular/platform-browser": "^8.1.1",
"@angular/platform-browser-dynamic": "^8.1.1",
"@angular/router": "^8.1.1",
"@auth0/auth0-spa-js": "^1.0.2",
"@ngx-progressbar/core": "^5.0.1",
"@ngx-progressbar/router": "^5.0.1",
"@ngx-translate/core": "^11.0.1",
"@ngx-translate/http-loader": "^4.0.0",
"angular-webstorage-service": "^1.0.2",
"bootstrap": "^3.4.1",
"chart.js": "^2.7.2",
"chartjs-plugin-zoom": "^0.7.2",
"classlist.js": "^1.1.20150312",
"core-js": "^3.1.4",
"font-awesome": "^4.7.0",
"hammerjs": "^2.0.8",
"mathjs": "^6.0.3",
"ng2-charts": "^2.3.0",
"ngx-clipboard": "^12.2.0",
"rxjs": "^6.2.1",
"rxjs-compat": "6.5.2",
"web-animations-js": "^2.3.1",
"zone.js": "^0.9.1",
"@angular-devkit/build-angular": "^0.801.1",
"@angular/compiler-cli": "^8.1.1",
"@angular/language-service": "^8.1.1",
"@types/jasmine": "^3.3.13",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~12.6.2",
"codelyzer": "~5.1.0",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^2.0.5",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
"protractor": "^5.3.2",
"ts-node": "~8.3.0",
"tslint": "~5.18.0",
"typescript": "^3.4.5"

does somebody know about this issue?
please help

@indrajitbnikam
Copy link
Author

Hi Sorry for opening this issue.

For some reason I coded like:

  // Auth0 application configuration
  config = {
    domain: 'dev-ei63abm5.eu.auth0.com',
    client_id: 'SdIpEcVs2DmLbQerZZJCxVCgGOM01BNa',
    redirect_uri: 'http://localhost:4200/callback'
  };

  constructor(private _auth0Client: Auth0Client) { }

when I was supposed to code like this:

  private _auth0Client: Auth0Client;

  // Auth0 application configuration
  config = {
    domain: 'dev-ei63abm5.eu.auth0.com',
    client_id: 'SdIpEcVs2DmLbQerZZJCxVCgGOM01BNa',
    redirect_uri: 'http://localhost:4200/callback'
  };

  constructor() { }

my bad 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant