Registering static methods are remote methods in Loopback 2.0

Loopback 2.0 and getting:

throw message;
TypeError: Cannot call method ‘apply’ of undefined
at SharedMethod.invoke /node_modules/loopback/node_modules/strong-remoting/lib/shared-method.js:213:17)

Reason is more than likely that you have defined a static method on your model that does not match the string used to register the static method as a remote method as outline here.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: