jaygould / nextjs-typescript-jwt-boilerplate Goto Github PK
View Code? Open in Web Editor NEWA simple implementation of a Next.js server side rendered web application written in Typescript with JWT authentication and a PostgreSQL database
A simple implementation of a Next.js server side rendered web application written in Typescript with JWT authentication and a PostgreSQL database
Hey!
Thank you so much for this great boilerplate!
I noticed that client/.env.sample
is missing, just to warn you :)
Dashboard.getInitialProps = async (ctx: NextPageContext) => {
const tokenService = new TokenService();
await tokenService.authenticateTokenSsr(ctx);
return {};
};
I got warning below for this sentence.
Dashboard returned an empty object from `getInitialProps`. This de-optimizes and prevents automatic static optimization. https://err.sh/zeit/next.js/empty-object-getInitialProps
Running the project clean after docker-compose build --no-cache and installing package.json in /client folder for the types
pc-client-dev | /home/app/client/node_modules/ts-node/src/index.ts:434
pc-client-dev | return new TSError(diagnosticText, diagnosticCodes)
pc-client-dev | ^
pc-client-dev | TSError: ⨯ Unable to compile TypeScript:
pc-client-dev | src/server.ts(26,25): error TS2769: No overload matches this call.
pc-client-dev | The last overload gave the following error.
pc-client-dev | Argument of type '(err: express.Errback) => void' is not assignable to parameter of type '() => void'.
pc-client-dev |
pc-client-dev | at createTSError (/home/app/client/node_modules/ts-node/src/index.ts:434:12)
pc-client-dev | at reportTSError (/home/app/client/node_modules/ts-node/src/index.ts:438:19)
pc-client-dev | at getOutput (/home/app/client/node_modules/ts-node/src/index.ts:578:36)
pc-client-dev | at Object.compile (/home/app/client/node_modules/ts-node/src/index.ts:775:32)
pc-client-dev | at Module.m._compile (/home/app/client/node_modules/ts-node/src/index.ts:858:43)
pc-client-dev | at Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
pc-client-dev | at Object.require.extensions.<computed> [as .ts] (/home/app/client/node_modules/ts-node/src/index.ts:861:12)
pc-client-dev | at Module.load (internal/modules/cjs/loader.js:1049:32)
pc-client-dev | at Function.Module._load (internal/modules/cjs/loader.js:937:14)
pc-client-dev | at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
pc-client-dev | npm ERR! code ELIFECYCLE
pc-client-dev | npm ERR! errno 1
pc-client-dev | npm ERR! @ dev: `ts-node --project ./src/tsconfig.server.json ./src/server.ts`
pc-client-dev | npm ERR! Exit status 1
pc-client-dev | npm ERR!
pc-client-dev | npm ERR! Failed at the @ dev script.
pc-client-dev | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
pc-client-dev |
pc-client-dev | npm ERR! A complete log of this run can be found in:
pc-client-dev | npm ERR! /root/.npm/_logs/2020-10-01T07_45_43_655Z-debug.log
pc-client-dev exited with code 1
Help would be appreciated
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.