简体   繁体   中英

Node.js + Vue.js: why is console.log() in vue.js files not showing in console?

I'm new to javascript development and I have a real project here. Let me describe:

  1. There is a project, an Express (Node.js) server that has a /public/app folder
  2. There is another project, a Vue.js app that has a /dist folder
  3. In the Express /public/app folder is copypasted vue.js application (copied from another project from /dist folder)
  4. Vue.js app runs at http://localhost:3000/app/#/

I've added some console.log() commands into a different files/places in a vue.js app code, for example:

app.ts

...
import {store} from './store/store';
import {isBoolean} from 'util';

console.log('APP');

let router = new VueRouter({
  routes: [
    { path: '/', component: WelcomeComponent },
...

or in component :

...
import * as common from '../../../store/common';
import * as country from '../../../store/country';

console.log('COMPONENT');

@Component({
  template: require('./template.html'),
  components: {
    'layout': LayoutContent2,
...

and so on. But none of the console.log() messages are displayed in a browser console. Im sure that an app is builded and copied correctly. So why can't I see the messages in console?

The problem was, that Windows was not replacing the old main.min.js file with the new one. After manually removing and copying the files again it works!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM