Meteor: insert failed: Method not found

前端 未结 1 1382
你的背包
你的背包 2020-12-30 22:46

I am receiving the insert failed: Method not found log message and it probably is the result of what is described in these threads:

  • Meteor using a
1条回答
  •  遥遥无期
    2020-12-30 23:07

    Make sure you've also declared your collection on the server as well as the client.

    In your code above @VINs = new Meteor.Collection("vins") in both the client and server so what it might be is that you've put your code into the /client directory?

    If so this means that the code will only be run on the client, even though you have the else for the if Meteor.isClient block.

    To rectify this, copy the line you used into a .coffee file in the /server directory:

    @VINs = new Meteor.Collection("vins")
    

    0 讨论(0)
提交回复
热议问题