sails-hook-adminpanel icon indicating copy to clipboard operation
sails-hook-adminpanel copied to clipboard

Error: Cannot use `adminpanel` hook without the `controllers` hook.

Open mathewjoe opened this issue 7 years ago • 4 comments

I'm facing this error when running sails lift. I'm on sails version 1.0.0-36 and version 1.0.15 of the admin panel.

mathewjoe avatar Jul 02 '17 22:07 mathewjoe

I'm not sure how to enable/install a controllers hook. I'm pretty new to sails, so any help would be appreciated.

mathewjoe avatar Jul 02 '17 22:07 mathewjoe

@disrupticons Main issue with it that this module was done for sails.js v 0.11+ Seems that Sails.js changed a lot in it's code and now plugin not working.

I'll try to take a look into issue. Please could you send logs with errors and if you will be able to show application code it would be awesome

konstantinzolotarev avatar Jul 03 '17 08:07 konstantinzolotarev

This is happening for a brand new project. These are the steps followed:

  • sails new test-sails-app
  • cd test-sails-app && npm install --save sails-hook-adminpanel
  • sails lift

This results in the following error:

info: Starting app...

error: A hook (`adminpanel`) failed to load!
error: 
error: Error: Cannot use `adminpanel` hook without the `controllers` hook.
    at /home/disrupticons/code/test-sails-app/node_modules/sails-hook-adminpanel/lib/initialize.js:41:27
    at arrayEach (/home/disrupticons/code/test-sails-app/node_modules/lodash/index.js:1289:13)
    at Function.<anonymous> (/home/disrupticons/code/test-sails-app/node_modules/lodash/index.js:3345:13)
    at Hook.initialize (/home/disrupticons/code/test-sails-app/node_modules/sails-hook-adminpanel/lib/initialize.js:39:15)
    at Hook.wrapper [as initialize] (/home/disrupticons/code/test-sails-app/node_modules/@sailshq/lodash/lib/index.js:3250:19)
    at /home/disrupticons/code/test-sails-app/node_modules/sails/lib/hooks/index.js:88:16
    at /home/disrupticons/code/test-sails-app/node_modules/async/dist/async.js:486:20
    at processQueue (/home/disrupticons/code/test-sails-app/node_modules/async/dist/async.js:1608:24)
    at taskComplete (/home/disrupticons/code/test-sails-app/node_modules/async/dist/async.js:1630:13)
    at /home/disrupticons/code/test-sails-app/node_modules/async/dist/async.js:1653:21
    at /home/disrupticons/code/test-sails-app/node_modules/async/dist/async.js:339:31
    at /home/disrupticons/code/test-sails-app/node_modules/async/dist/async.js:847:20
    at Hook.loadModules (/home/disrupticons/code/test-sails-app/node_modules/sails/lib/hooks/index.js:139:14)
    at Hook.wrapper [as loadModules] (/home/disrupticons/code/test-sails-app/node_modules/@sailshq/lodash/lib/index.js:3250:19)
    at modules (/home/disrupticons/code/test-sails-app/node_modules/sails/lib/hooks/index.js:79:25)
    at runTask (/home/disrupticons/code/test-sails-app/node_modules/async/dist/async.js:1662:17)

error: Could not load Sails app.
error: 
error: Tips:
error:  • First, take a look at the error message above.
error:  • Check that you're using the latest stable version of Sails.
error:  • Have a question or need help?  (http://sailsjs.com/support)

mathewjoe avatar Jul 03 '17 12:07 mathewjoe

anyone solve this

fawzywassel avatar Jul 24 '18 23:07 fawzywassel