#Missing console.log messages from server side

1 messages · Page 1 of 1 (latest)

trim acorn
#

Hello, I have problems seeing server logs with a new 2.1.0 app (created using npx create-remix@latest --template remix-run/remix/templates/express). I don't see any console.log call made from a loader/action in the terminal from where I ran npm run dev, however any console.log made from a component is visible without issues in the browser console.
Any advice will be appreciated 🙂

trim acorn
#

This seems to be related to the express template (version 2.1.0, 2.2.0). An app generated with the default template show the server logs as expected.

supple tartan
#

I just did:

npx create-remix@latest --template remix-run/remix/templates/express test-console.log
cd test-console.log
vi app/routes/_index.tsx

And added there:

export const loader = () => {
  console.log("In loader...");
  return true;
};

Then:

npm run devel

And I can clearly see the message in the console when I visit the site: "In loader..."

The only thing different is that the command installed the new Remix 2.2.0 dependencies.

I think you should check a minimalistic example like the one I just wrote in order to find out if your problem comes from something related to something external to your app, like your Nodejs installation or your terminal or whatever; or an internal problem of your app.

Once you know that you can start doing a fine grained search for possible responsibles. If the problem lies in your app, a git bisect session may prove helpful to find out at which point (commit) console.log stopped working.

Hope you find it 🙂