'turbolinks not loading until page refresh in rails 6.1 app

This results in flatpickr fields grey and 100% width and javascript not loading I tried to see what was going on by adding an

if (Turbolinks)
  console.log('Turbolinks loaded')
end

but then it always logs to console 'Turbolinks loaded' How do I diagnose There are new syntax's for loading turbolinks in application.js I reverted to require("turbolinks").start() in an attempt to get it working but it didn't help



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source