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 import PassportStrategy from @nestjs/passport #15

Closed
brianmcgee opened this issue Aug 8, 2018 · 5 comments
Closed

Can't import PassportStrategy from @nestjs/passport #15

brianmcgee opened this issue Aug 8, 2018 · 5 comments

Comments

@brianmcgee
Copy link

I'm submitting a...


[x] Regression 
[ ] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

Install the package

npm install @nestjs/passport

Importing something from the package results in an error.

import { PassportStrategy } from '@nestjs/passport';

[nodemon] 1.18.3
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: /usr/src/api/src/**/*
[nodemon] starting `ts-node -r tsconfig-paths/register src/main.ts`
Error: Cannot find module './dist'

Environment

"@nestjs/passport": "^1.1.0",
  • Node version: v10.8.0
  • Platform: Linux

Specifying ~1.0.11 resolves the issue. Looks like a re-occurrence of #2

@kamilmysliwiec
Copy link
Member

Can't reproduce. Just tested with v1.1.0

@xmlking
Copy link

xmlking commented Aug 31, 2018

same error with @nestjs/passport 5.0.0
has no exported member PassportStrategy
image

@SpiritOfSuffer
Copy link

the same with @nestjs/passport 5.1.0
image

@WLyKan
Copy link

WLyKan commented Jul 30, 2020

same error. I fixed with these steps:

  1. first, uninstall the packages: npm uninstall -S @nestjs/passport passport

  2. second, reinstall the packages npm i --save @nestjs/passport passport

done.

@israr2018
Copy link

These steps also solved issue for me.

  1. npm uninstall -S @nestjs/passport passport
  2. npm i --save @nestjs/passport passport

@nestjs nestjs locked and limited conversation to collaborators May 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants