node.jssails.jssails.io.js

sails.io.js script called twice


i have an issue with my sails application.

All of my js script are called twice but my less file are correctly called only one time.

In my IDE

In my firefox inspector

This problem is present on chrome/edge/opera/firefox

Any idea ?

Thanks


Solution

  • This is only a guess based on what you've shown us, but I wonder, do you have the open-and-close script tags: <!--SCRIPTS--> and <!--SCRIPTS END--> in both your view file, and in your layout file?

    The default layout file is views/layout.ejs, and the default can be set/changed in /config/views. If you are using the layout and it is in your views/ folder, then grunt is likely adding scripts to it as well as your specific view file. You should remove the script tags from either the layout or your specific view files, and (if this is the source of error) that will fix the problem.