M
M
Marolex2015-09-28 16:35:36
css
Marolex, 2015-09-28 16:35:36

Problem with background-image in Stylus?

Here is a simple project:

project/
       package.json
       node_modules
       gulpfiel.js
       app/
          images/ 1.jpg
          stylus/ main.styl
          css/ main.css
          index.html

Let's write
html
  background-image url(../images/1.jpg)

We compile and an error occurs from gulp-stylus supposedly there is no such file
Message:
    ENOENT: no such file or directory, open 'C:\Users\Администратор\Desktop\images\1.jpg'

As noted, he is looking for the images folder not in the app folder, but in the parent Desktop in which our project lies.
If you manually correct it in css and open index.html, then everything is connected
. And the crutch is to copy the images folder to the desktop.
I found this but I can't figure it out.
Has anyone else experienced this and how do I resolve it :(

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey P, 2015-10-09
@ruddy22

can you post gulpfile.js? Let's see what's in the settings.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question