Closed codechips closed 5 years ago
It sounds like you're using haute-couture to create a service but schmervice hasn't actually been registered as a plugin. Try registering schmervice and let us know if it keeps giving you issues!
Here's a shortcut:mkdir lib/plugins && echo "'use strict';\n\nmodule.exports = {};\n" > lib/plugins/schmervice.js
.
Yep. Worked. Thanks a lot for the swift reply 👍
@devinivy How to do this, now that schmervice is named "@hapipal/schmervice"? Thanks a lot.
@sebastianhelbig You can register the plugin onto the server yourself:
await server.register('@hapipal/schmervice');
Or if you're using haute-couture and the pal boilerplate you can simply create a file named lib/plugins/@hapipal.schmervice.js
exporting an empty object (i.e. no plugin configuration). Here's an example: https://github.com/devinivy/hapipal-realworld-example-app/blob/main/lib/plugins/%40hapipal.schmervice.js.
Not sure if it's a hpal issue, but certainly related to it or one of the hapipal family modules. The hpal generated project fails to register new Schmervice services with the following error:
Steps to reproduce: 1) Create a new hpal project (hpal new test_project && cd test_project && npm i) 2) Create a route and fill in the details (hpal new route root) 3) Install schmervice (npm i schmervice) 4) Create a new service (hpal new service simple) 5) Server now fails to start.
It used to work earlier, so my guess that it's some module change down the line that's causing trouble.