[Vuejs]-Error: Cannot find module – Local path of image won't load in vue.js

0πŸ‘

βœ…

In your methods inside require use empty string to concatenate your path and get string as a result, which require expects:

getImage(poster) {
  return poster ? require("" + poster) : ''
}

You can find more information about that if you read require with expression of the official docs.

Leave a comment