-
Notifications
You must be signed in to change notification settings - Fork 343
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
NestJS - Doesn't compile. #446
Comments
Cannot see how the stack-trace related to const app = await NestFactory.create(AppModule) |
ohh sorry i forgot to mention that the .ts stack trace leads to: |
having similar issue:
|
Update: I had to use the 'esModuleInterop' flag set true to allow the code above to work. |
I have this issue as well. Error:
Code: app.use(
session({
secret: process.env.SECRET,
store: MongoStore.create({
mongoUrl: process.env.DB,
dbName: 'maindb',
collectionName: 'sessions',
ttl: 14 * 24 * 60 * 60,
crypto: {
secret: process.env.SECRET,
},
}),
resave: true,
saveUninitialized: true,
cookie: {
maxAge: 7 * 24 * 60 * 60 * 1000,
domain: process.env.COOKIE_DOMAIN,
},
}),
); Temporary Fix: |
Having the same issue here.
I have no clue if this helps anyone but here you go. |
I having same issue, my app not working because I used import MongoStore from 'connect-mongo', TypeError: Cannot read properties of undefined (reading 'create') |
Hi all. Sorry for the late reply. Could you guys please provide your |
@mingchuno connect-mongo : ^4.6.0, I'm solved the problem by @6lph9 solution |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I have the same issue import { NestFactory } from '@nestjs/core'
import session from 'express-session'
import passport from 'passport'
import 'colors'
import { AppModule } from './app.module'
import { computeHash } from '~server/utils/utils'
import MongoStore from 'connect-mongo'; Use |
I have the same problem and since |
Thanks! |
Any updates on this? I face the same issue. |
I'm submitting a ...
[x] bug report
[ ] feature request
[ ] question about the decisions made in the repository
[ ] question about how to use this project
Summary
Using MongoStore within nestjs crashes the application with the following error:
The text was updated successfully, but these errors were encountered: