If you are on nodebb 1.12.2 you should use the version of db search in your package.json. 4.0.6 is for nodebb 1.13.0 which isn't released yet.
NodeBB: Search Bar Widget Error
I am getting this error while searching...
GET http://localhost:4567/api/search/?term=we&in=titlesposts 404 (Not Found)
Works fine here: https://community.nodebb.org/api/search/?term=we&in=titlesposts
Perhaps you don't have the search plugin enabled?
I have enabled the plugin. Is there any issues related to plugin version or the search is database(mongo/redis) dependent? Need help.