Error: strapiServer is not a function

The problem was that the file was empty. As soon as you write the code in it(module.exports = plugin …) and start the server, it works fine.