question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

client pings, but there's no entry for page

See original GitHub issue

Bug 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

image

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:closed
  • Created 4 years ago
  • Reactions:7
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

20reactions
timneutkenscommented, Nov 15, 2019

any solutions?

@szczepcio95 this comment is not helpful

  • Same as saying +1, so you can use emoji reactions
  • Does not provide any reproduction
  • Is not actionable
10reactions
cybertinocommented, Jul 11, 2019

@timneutkens, I resolved it. I had screwed up next.config.js: overwritten default aliases. So all good now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

client pings, but there's no entry for page · Issue #7656 - GitHub
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...
Read more >
Module parse fail in next js zero-config - Stack Overflow
Next it seems doesn't handle the transpilation but according to ... [ event ] client pings, but there's no entry for page: /_error...
Read more >
Ping works fine, but no Internet connection in browser
I can't access the Internet anymore. Try reinitialising the network states. Run the following commands in an elevated cmd shell:.
Read more >
can ping host but it is not in dns - TechNet
but ping that host name on clients still return the ip of that server. there is no WINS and i am sure that...
Read more >
CLIENT SECRET - Ping Identity Support Portal
No token. ... This article explains “OAuth 2.0 client authentication”. ... but the end users are prompted for a username and password, still,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found