Console.log statements were not appearing when running a Remix-based Shopify app locally (npm run dev) on macOS 14 with Node v18.12 and up-to-date Remix/Shopify packages. Logging was expected from a console.log placed inside an action function (app._index.ts), with logger set to debug.
Key clarification: Frontend console.log logs to the browser; backend/server logs appear in the terminal. In Remix, action functions run on form submissions or POST requests; loader functions run during page load/data fetching.
Troubleshooting steps: Compared with an older Remix tutorial project where logs appeared, leading to initial suspicion of package/CLI changes. A suggestion was made to confirm that something triggers the action and to try logging in the loader.
Outcome: The issue was a misunderstanding—action is not called at startup, so the server-side console.log won’t run until the action is invoked (e.g., via a form submit). No package or CLI problem was identified.
No matter where I place my own Console.log(), no logs are output with the remix template. I have also set the logger to debug. I started locally with npm run dev.
I have looked at so many things. But I just can’t find a solution. My packages are the latest ones:
Make sure you take a look at where your console.log code is. If its placed on the frontend, it will be logging to the browser/client side. If its on the backend, it will be logging to your console in VS code or wherever you are running your code.
Thanks for your reply. I also thought I was looking wrong. But if, for example, I add a console.log to app._index.ts within action in the remix template, it should be printed on the server side and thus in the terminal and not in the browser.
I tried an other project from a YouTuber https://github.com/stefanoHTB/remix-youtube-tutorial. Because I thought I had done something wrong. But I think something about the new packages or cli no longer fits. The older packages in this projects work. And I can output everything via console.log.