Search code examples
javascriptmeteorvulcanjs

TypeError: Restivus is not a constructor in Vulcan project


I have tried to add the meteor package nimble:restivus to my Vulcan project (which runs on meteor). When I add the following code:

import {Restivus} from 'meteor/nimble:restivus'

var Api = new Restivus ({
  useDefaultAuth: true,
  prettyJson: true,
});

export default Api

I get the error TypeError: Restivus is not a constructor when i build my app. I have tried adding the older version according to this: https://github.com/kahmali/meteor-restivus/issues/290 but still no luck. If i remove the curly brackets from import {Restivus}, still no luck. Spent days trying to figure this out, does anyone know how to solve this?


Solution

  • To anyone else that has this problem, I have spoken to the Vulcan team and there are a number of meteor packages that don't work with Vulcan. Don't ask me how many or which ones, as they didn't specify and I'm not sure why they don't work. I was told however, that npm packages are preferred, so you should use these over meteor packages if possible.