the hook orm taking too long to load

前端 未结 8 1815
悲&欢浪女
悲&欢浪女 2020-12-05 14:17

i am using two database adapters with sails.

one for mondoDB and second for mysql.whenever i run command \"sails lift\".once it gives an error

error         


        
8条回答
  •  一个人的身影
    2020-12-05 14:57

    Go to you node_modules folder and browse to \sails\lib\app\private

    In your case you should go to this folder: C:\Users\KAMI\AppData\Roaming\npm\node_modules\sails\lib\app\private

    Then open the file named loadHooks.js and go to the line that says:

    var timeoutInterval = (sails.config[hooks[id].configKey || id] && sails.config[hooks[id].configKey || id]._hookTimeout) || sails.config.hookTimeout || 20000;
    

    Change the last value in this line from 20000 to some higher value and save the file then run your application by "sails lift" as you normally do

    NB: you may need to try out a few higher values instead of 20000 until you reach a value that works for you. My application successfully lifted when I changed the value to 50000

提交回复
热议问题