Anybody had issues building `StaticSite` with `esb...
# seed
a
Anybody had issues building
StaticSite
with
esbuild
in SEED? Getting this error:
Copy code
> rm -rf dist && mkdir dist && node build.config.js && cp -a public/. dist/
 > ../../../tmp-1294-7fGSjwxdnAjc/marketing/src/styles/main.css:1:22424: error: Could not resolve "../../../../../seed/source/marketing/public/assets/img/cursor-view_01.svg"
    1 │ ...cursor:url("../../../../../seed/source/marketing/public/assets/img...
      ╵               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 > ../../../tmp-1294-7fGSjwxdnAjc/marketing/src/styles/main.css:1:39329: error: Could not resolve "../../../../../seed/source/marketing/public/assets/img/icons/icon-chevron-down-grey_01.svg"
    1 │ ...-image:url("../../../../../seed/source/marketing/public/assets/img...
      ╵               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Looks like my files are built in a
tmp
folder?
f
by tmp url u mean 
tmp-1294-7fGSjwxdnAjc
?
a
Yeah.
Not sure where is that coming from.
Because is not in the source folder.
f
So your repo is inside
seed/source
, so by looking at these 2 paths:
"../../../../../seed/source/marketing/public/assets/img/cursor-view_01.svg"
and
../../../tmp-1294-7fGSjwxdnAjc/marketing/src/styles/main.css
it seems like
tmp-1294-7fGSjwxdnAjc
is within ur repo?
a
Hum.
I see, yes, might be in the same root folder.
Somehow the SCSS loader is failing.
Here is more info….
Copy code
note: Attempting to load "/seed/source/marketing/public/assets/img/cursor-view_01.svg" as a file
   note:   Failed to read directory "/seed/source/marketing/public/assets/img": open /seed/source/marketing/public/assets/img: no such file or directory
   note: Attempting to load "/seed/source/marketing/public/assets/img/cursor-view_01.svg" as a directory
   note:   Failed to read directory "/seed/source/marketing/public/assets/img"
   note:   Failed to read directory "/seed/source/marketing/public/assets/img/cursor-view_01.svg"
 > ../../../tmp-1275-h4lkd3BbCy13/marketing/src/styles/main.css:1:22424: error: Could not resolve "../../../../../seed/source/marketing/public/assets/img/cursor-view_01.svg"
    1 │ ...cursor:url("../../../../../seed/source/marketing/public/assets/img...
      ╵               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Apparently is attempting to load a file, and says it doens’t exists… but it should exists…
I think is missing the
/tmp/seed
.
f
Yeah I don’t think
/tmp/seed
exists. Do you where the path comes from?
a
It should exists.
That’s where the code is cloned.
What doesn’t exist is
/seed
.
f
Sorry, I meant
/seed/source
, where does that path come from?
a
No idea.
😞
Somehow is generated.
Is not in the code.
I mean, the SVG loader is doing it for some reason.
f
Taking a guess from the log above, could it be that whoever was trying to import the svg ie.
../../../../../seed/source/marketing/public/assets/img/cursor-view_01.svg
, it is confused where the cwd is
../../../../../
let to the root?
a
Yeah coming to the same conclusion too.
Looks like is confusing the root.
I like the esbuild loader is the one confusing things.
Wich is weird.
Well, I gave up, going to hardcode the SVG in
data uri
.
For some reason the
svg loader
is using the wrong dir.
f
hmm.. another thing you could try would be to pull the docker image Seed uses, and see if you a similar error.
Or would it be easy to setup a minimal repo for this? I can try dig into this.
a
Yeah it’s fine, going to try the local seed soon.