Marko: Infinite restarting

Created on 6 May 2016  路  2Comments  路  Source: marko-js/marko

Hi! After upgrade nodemon, node and migrating from marko 2.x to 3.x version i getting next problem:
Node.js version: 6.0.0

npm start

[email protected] start /home/baddad/Projects/Appname
NODE_ENV=development nodemon app.js -e js,marko,json --trace-sync-io --verbose

[nodemon] 1.9.2
[nodemon] to restart at any time, enter rs
[nodemon] ignoring: .git .nyc_output .sass-cache bower_components coverage /home/baddad/Projects/Appname/node_modules/\*/
[nodemon] watching: .
[nodemon] watching extensions: js,marko,json
[nodemon] starting node app.js --trace-sync-io
[nodemon] child pid: 20375
[nodemon] watching 2,134 files
[nodemon] files triggering change check: application/frontend/home/home.marko.js
[nodemon] matched rule: \*\/.\*
[nodemon] changes after filters (before/after): 1/1
[nodemon] restarting due to changes...
[nodemon] application/frontend/home/home.marko.js

[nodemon] starting node app.js --trace-sync-io
[nodemon] child pid: 20383
[nodemon] files triggering change check: application/frontend/home/home.marko.js
[nodemon] matched rule: \*/.\*
[nodemon] changes after filters (before/after): 1/1
[nodemon] restarting due to changes...
[nodemon] application/frontend/home/home.marko.js

[nodemon] starting node app.js --trace-sync-io
[nodemon] child pid: 20391
[nodemon] files triggering change check: application/frontend/home/home.marko.js
[nodemon] matched rule: \*/.\*
[nodemon] changes after filters (before/after): 1/1
[nodemon] restarting due to changes...
[nodemon] application/frontend/home/home.marko.js

[nodemon] starting node app.js --trace-sync-io
[nodemon] child pid: 20399
[nodemon] files triggering change check: application/frontend/home/home.marko.js
[nodemon] matched rule: \*/.\*
[nodemon] changes after filters (before/after): 1/1
[nodemon] restarting due to changes...
[nodemon] application/frontend/home/home.marko.js

Most helpful comment

@GenaANTGOfficial when a marko template is compiled it will produce a *.js file next to the original file and the generation that new file is triggering a restart. The reason you are seeing the infinite restart after upgrading to Marko v3 is that Marko v3 will always recompile the template in development to avoid caching problems. You should update your nodemon config to ignore changes to *.marko.js files: https://github.com/marko-js/marko#nodemon

Or, better yet, use browser-refresh :)

All 2 comments

@GenaANTGOfficial when a marko template is compiled it will produce a *.js file next to the original file and the generation that new file is triggering a restart. The reason you are seeing the infinite restart after upgrading to Marko v3 is that Marko v3 will always recompile the template in development to avoid caching problems. You should update your nodemon config to ignore changes to *.marko.js files: https://github.com/marko-js/marko#nodemon

Or, better yet, use browser-refresh :)

@patrick-steele-idem Thanks you very much! All works fine :) :+1: But in previous version(2.x) i did not see this problem.

Was this page helpful?
0 / 5 - 0 ratings