createTableIfMissing not working
See original GitHub issueWith the following
import connectPgSimple from 'connect-pg-simple';
const store = new (connectPgSimple(session))({createTableIfMissing: true} as any);
app.use(session({secret: '...', saveUninitialized: true, resave: false, store})); // defaults: httpOnly
I just get Failed to prune sessions: relation "session" does not exist
on start and error: relation "session" does not exist
on the first request.
Also, without as any
I get Argument of type '{ createTableIfMissing: boolean; }' is not assignable to parameter of type 'PGStoreOptions'.
, so @types/connect-pg-simple
seems to be outdated.
"@types/connect-pg-simple": "^4.2.2",
"connect-pg-simple": "^6.2.1",
"express": "^4.17.1",
"express-session": "^1.17.1",
"typescript": "^4.1.5",
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:17 (5 by maintainers)
Top Results From Across the Web
voxpelli/node-connect-pg-simple - GitHub
Advanced example showing some custom options: ... createTableIfMissing - if set to true then creates the table in the case where the table...
Read more >Connect-pg-simple express: Failed to prune sessions
Reason: You are having that error because you probably do not have the session table in your database. Probably fix:.
Read more >connect-pg-simple - npm Package Health Analysis - Snyk
The npm package connect-pg-simple was scanned for known vulnerabilities and missing license, and no issues were found. Thus the package was deemed as...
Read more >Problem In writing data in SQL Sever 2008 - Qlik Community
Hello,. I hav created a excel schema and table schema. To read data from excel and write that data into database table.
Read more >CSV File to SQL - Confluence
Param Name Is Required Inputs Type Input Default Value
sourceFilePath True String
delimiter False String ','
encoding False String UTF‑8
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I corrected myself earlier:
Part of the reason is that this has to interact with express-session and for a long time those types were a bit so-so, making it hard to make something useful of it.
Apart from that: The focus of this module is to be the simplest postgres session module for express, thus depending on nothing but the pg module itself, enabling it to be used for most scenarios.
If one needs a more complex solution, then it’s correct to look for that in another solution.
If one believes this module fails in delivering what it intends to deliver, then let’s fix it 🙂
Thanks @aboqasem, I had forgotten that
7.0.0
was still in a prerelease state, I have now released a stable7.0.0
.Sorry everyone for not thinking of this myself earlier. I’ll close this issue as solved for now, if an update to
7.0.0
does not solve it, then comment and I can reopen.