client pings, but there's no entry for page
See original GitHub issueBug report
Describe the bug
I keep getting this message since I added a custom server. I read many links where it says it may be related to using Link without as but it’s not my case. i used the custom-server-typescript as an example but using typescript. The issue I have is that the server keeps restarting and it gets stuck at restarting. The message is Restarting: /…/.next/server/static/development/pages/cart.js has been modified
this is my tsconfig.json
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"jsx": "preserve",
"lib": ["dom", "es2017"],
"moduleResolution": "node",
"strict": true,
"allowJs": true,
"noEmit": true,
"esModuleInterop": true,
"skipLibCheck": true,
"isolatedModules": true,
"preserveConstEnums": true,
"sourceMap": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"resolveJsonModule": true
},
"exclude": [
"node_modules",
"dist",
".next",
"out",
"next.config.js",
"apollo.config.js"
],
"include": ["**/*.ts", "**/*.tsx"]
}
and this is the tsconfig.server.json
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "commonjs",
"outDir": "dist",
"target": "es2017",
"isolatedModules": false,
"noEmit": false
},
"exclude": [
"node_modules",
"dist",
".next",
"out",
"next.config.js",
"apollo.config.js"
],
"include": ["server/**/*.ts"]
}
and this is my server.ts
import express from 'express';
import next from 'next/dist/server/next';
const dev = process.env.NODE_ENV !== 'production';
const app = next({ dev });
const handle = app.getRequestHandler();
app
.prepare()
.then(() => {
const server = express();
server.get('/category/:id', (req, res) => {
const actualPage = '/category';
const queryParams = { id: req.params.id };
app.render(req, res, actualPage, queryParams);
});
server.get('/product/:id', (req, res) => {
const actualPage = '/product';
const queryParams = { id: req.params.id };
app.render(req, res, actualPage, queryParams);
});
server.get('/order/:id', (req, res) => {
const actualPage = '/order';
const queryParams = { id: req.params.id };
app.render(req, res, actualPage, queryParams);
});
server.get('*', (req, res) => {
return handle(req, res);
});
server.listen(3000, err => {
if (err) throw err;
console.log('> Ready on http://localhost:3000');
});
})
.catch(ex => {
console.error(ex.stack);
process.exit(1);
});
start script
ts-node-dev --project tsconfig.server.json --no-notify --respawn --transpileOnly server/index.ts
I’m also seeing this errors an warnnigs in the console

To Reproduce
I’m basically using the custom-server-typescript example and using express for the server. I’m also using react-apollo v3
System information
- OS: macOS
- Version of Next.js: 8.1.1-canary.28
Additional context
The cart page where I see this error has no query parameters. Is not the only page I see the error, but I just wanted to pointed it out that I have no need to use Link with parameters and use as in this case
This only happens when running the custom server. Otherwise everything works fine
Do I need to include the pages that not require parameters to the custom server routes? Or do I need to set the as parameter to the Link component even if I don’t need parameters in the page?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:15 (5 by maintainers)

Top Related StackOverflow Question
@szczepcio95 this comment is not helpful
@timneutkens, I resolved it. I had screwed up
next.config.js: overwritten default aliases. So all good now.