console.log() not showing messages



  • I used the CLI to create a vanilla Quasar app and then ran it using ‘quasar dev’. It ran just fine. I then went back and added some console.log() statements in various places to observe the loading order. Places like router/index.js, store/index.js, etc. When I run the app again using ‘quasar dev’, the app runs just fine as before, but I see no output from the console.log statements on the console. Is Quasar directing console output somewhere else, like a log file? How do I make console.log work?
    Thanks!



  • OK, now I get it. console.log() is done client-side, so it prints to the browser console, not the server. I was expecting to see messages in the shell where I ran ‘quasar dev’, as with a node.js application. Which leads to the question, does the Quasar app run entirely in the browser, or do some parts run server-side?



  • @DeliciousPickle - the quasar-cli runs in a node environment, which is where the vue files are transpiled (changed) by babel and webpack to be normal html, css and js. This stuff is then sent to the brower. If you need tighter integration with node, then you will probably want to look into creating app extensions - or potentially making electron applications. All of that is covered pretty in depth in the docs.


Log in to reply