Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Invalid fileDependencies for SCSS partials #255

Open
alreece45 opened this issue Aug 8, 2017 · 0 comments · May be fixed by electron-userland/electron-compilers#79
Open

Invalid fileDependencies for SCSS partials #255

alreece45 opened this issue Aug 8, 2017 · 0 comments · May be fixed by electron-userland/electron-compilers#79

Comments

@alreece45
Copy link

alreece45 commented Aug 8, 2017

When using SCSS with partial imports, the proper path of the partials are not stored, resulting in an error.

For example, this works fine on the first load, but not on subsequent loads (from the cache)

@import "base"  /* _base.scss */

When loading from the cache, one will get an error like this (but with full paths):

Failed to compile src/style/index.scss: ENOENT: no such file or directory, lstat 'src/style/base.scss'
Error: ENOENT: no such file or directory, lstat 'src/style/base.scss'
    at fs.lstatSync (fs.js:902:18)
    at Object.fs.lstatSync (ELECTRON_ASAR.js:244:16)
    at Object.realpathSync (fs.js:1542:21)
    at Object.fs.realpathSync (ELECTRON_ASAR.js:321:29)
    at cachedRealpath (node_modules/electron-compile/lib/sanitize-paths.js:25:22)
    at sanitizeFilePath (node_modules/electron-compile/lib/sanitize-paths.js:52:16)
    at FileChangedCache.getCacheEntryForPath (node_modules/electron-compile/lib/file-change-cache.js:201:48)
    at node_modules/electron-compile/lib/file-change-cache.js:239:41
    at Generator.next (<anonymous>)
    at step (node_modules/electron-compile/lib/file-change-cache.js:27:191)

It should have the _base.scss as a dependent file, rather than base.scss

--

I've created a small application that reproduces the issue. It has two buttons, one that changes just the page with two buttons:

  • Reload (Broken): reloads the page, probably from the broken cache)
  • Reload (Working): modifies the scss file, then reloads (compiling the SCSS file, without error).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant