aglio
aglio copied to clipboard
Cannot write or read cache for themes (ENOENT on cache folder)
I am suddenly experiencing a problem with the aglio-olio-theme
. I'm receiving a ENOENT
issue (missing file/directory) on aglio 2.2.0
:
Error: Could not get CSS: Error writing cached CSS to file: ENOENT: no such file or directory, open '/Users/adminaccount/Code/clint/ui/node_modules/blot/node_modules/aglio-theme-olio/cache/b0b0865f713b341beb7fe4b90d8e628262a88e6b.css'"
I was able to resolve this error by simply running the following:
mkdir node_modules/blot/node_modules/aglio-theme-olio/cache
The postinstall
script for the aglio-theme-*
packages could be updated to simply ensure the cache directory exists before the module is used. Alternatively you could check that the cache directory exists just before it's used, using something like mkpath
- I personally prefer the latter approach as it prevents the build from getting too crufty.
I also wanted to note that the NO_CACHE=1
flag will not resolve the issue here, which is expected since this flag only prevents the reading of the cache, not the creation of it. Updating this flag to be responsible for both creating and reading the cache is another potential solution here.
you can create an css file named 'b0b0865f713b341beb7fe4b90d8e628262a88e6b.css' in '/Users/adminaccount/Code/clint/ui/node_modules/blot/node_modules/aglio-theme-olio/cache/'
@slurmulon I have a PR (#270) still open which makes NOCACHE=1
work as you suggest.
This will fix your problem, but I don't know if this project is abandoned at this point.
@danielgtaylor @slurmulon @chesleybrown Are you guys alive? Can someone merge #270 to solve the problem?
i think it is a bug
so I use sunzd116's answer
you can create an css file named 'b0b0865f713b341beb7fe4b90d8e628262a88e6b.css' in '/Users/adminaccount/Code/clint/ui/node_modules/blot/node_modules/aglio-theme-olio/cache/'
mkdir /usr/local/lib/node_modules/aglio/node_modules/aglio-theme-olio/cache/
touch /usr/local/lib/node_modules/aglio/node_modules/aglio-theme-olio/cache/bb851236ef33e467631256487d5bbe519de24415.css
and it is ok now