Open comm33 opened 8 years ago
I can confirm I get the same
If any of you know what is wrong here PR are welcome :) I'm not using sails anymore so sails repos are not my priority for now
it happens with v0.12.2 as well but not with v0.12.1 - if I can find some time I will try to diagnose further
Any ideas on how to eliminate this issue while waiting on this PR?
I managed to workaround this by: 1) copying file 'node_modules/sails-hook-schedule/api/models/CronTask.js' to your project's 'api/models/ directory and then 2) changing line 86 in file 'node_modules/sails-hook-schedule/index.js' from 'sails.models.crontask.find().then(function (dbTasks)' to 'CronTask.find().then(function (dbTasks)'
i think its a bad idea to modify your node modules folder. This solved my issue.
I think it has to do with this issue with the sails-util-mvcloader module
https://github.com/leeroybrun/sails-util-mvcsloader/issues/9
Same issue using sails 0.12.11
i think its a bad idea to modify your node modules folder. This solved my issue.
This also worked for me. Took about 5 minute to implement.
I get this when I attempt to start sails after updating to sails 0.12.3:
TypeError: sails.models.crontask.find is not a function at Hook.reloadTasks (/opt/app/node_modules/sails-hook-schedule/index.js:86:26) at Hook.wrapper as reloadTasks at /opt/app/node_modules/sails-hook-schedule/index.js:122:14 at /opt/app/node_modules/sails/lib/app/private/after.js:91:14 at /opt/app/node_modules/sails/node_modules/async/lib/async.js:721:13 at /opt/app/node_modules/sails/node_modules/async/lib/async.js:52:16 at done (/opt/app/node_modules/sails/node_modules/async/lib/async.js:246:17) at /opt/app/node_modules/sails/node_modules/async/lib/async.js:44:16 at Sails. (/opt/app/node_modules/sails/node_modules/async/lib/async.js:718:17)
at Sails. (/opt/app/node_modules/sails/node_modules/async/lib/async.js:167:37)
at Sails.g (events.js:260:16)
at emitNone (events.js:72:20)
at Sails.emit (events.js:166:7)
at Sails.emitter.emit (/opt/app/node_modules/sails/lib/app/private/after.js:50:11)
at /opt/app/node_modules/sails/lib/app/private/loadHooks.js:103:15
at /opt/app/node_modules/sails/node_modules/sails-hook-orm/node_modules/async/lib/async.js:52:16
at /opt/app/node_modules/sails/node_modules/sails-hook-orm/node_modules/async/lib/async.js:550:17
at /opt/app/node_modules/sails/node_modules/sails-hook-orm/node_modules/async/lib/async.js:544:17
at _arrayEach (/opt/app/node_modules/sails/node_modules/sails-hook-orm/node_modules/async/lib/async.js:85:13)
at Immediate.taskComplete (/opt/app/node_modules/sails/node_modules/sails-hook-orm/node_modules/async/lib/async.js:543:13)
at processImmediate as _immediateCallback