Skip to content
Discussion options

You must be logged in to vote

What happened was that the "debugger" started, but clearly it wasn't matching correctly the source code to the executed code.

I was able to make this work by making some modifications to the app template

server/index.js

require("@babel/register")({
  // needs to specify a custom babel config file because if you use the "default" name NextJS detects it and tries to use it too
  configFile: './babel.server.config.json',
  ignore: ["node_modules"],
});

// Import the rest of our application.
module.exports = require("./server.js");

babel.server.config.json

{
  "presets": [
    [
      "@babel/preset-env",
      {
        "targets": {
          "node": "current"
        }
      }
    ]
  ]
}

Replies: 2 comments 2 replies

This comment has been minimized.

@esteban-filardi

This comment has been minimized.

@JaKXz

This comment has been hidden.

Comment options

You must be logged in to vote
0 replies
Answer selected by JaKXz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #666 on March 30, 2022 15:25.