Error when running Yarn build:production

I’m getting the following error "Module build failed: ModuleNotFoundError: Module not found: Error: Can’t resolve ‘…/…/images/d.jpg’ in ‘C:\Users\maisa\Desktop\portfolio\resources\assets\styles’

in my header.scss this is how im getting the image .

view {
  background: url(../../images/d.jpg);
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  height: 600px;

The image is displaying though.


background: url(../images/d.jpg);

as the styles file is in dist/styles and is looking for an image in dist/images

1 Like