Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS Storage errors due to existing .cache directory #114

Open
whakamolenz opened this issue Mar 6, 2019 · 3 comments
Open

FS Storage errors due to existing .cache directory #114

whakamolenz opened this issue Mar 6, 2019 · 3 comments

Comments

@whakamolenz
Copy link

whakamolenz commented Mar 6, 2019

I'm submitting a ... (check one with "x")

[X] Regression (a behavior that used to work and stopped working in a new release)
[] Bug report  <!-- Please check the repository for a similar issue or PR before submitting -->
[ ] Support request => <!-- Please check the repository for a similar issue or PR before submitting -->
[ ] Feature request
[ ] Documentation issue or request

Current behavior
When using SSR rendering and the FS Storage module, when the cache directory already exists (i.e. all loads but the very first one) then an error is given.

Error: EEXIST: file already exists, mkdir 'D:\home\site\wwwroot.cache'
at fs.mkdirSync (fs.js:885:18)
at new FsStorageService (D:\home\site\wwwroot\server.js:160265:65)
at _createClass (D:\home\site\wwwroot\server.js:25360:20)
at createProviderInstance (D:\home\site\wwwroot\server.js:25332:26)
at resolveNgModuleDep (D:\home\site\wwwroot\server.js:25296:21)
at NgModuleRef
.get (D:\home\site\wwwroot\server.js:26004:16)
at new FsCacheService (D:\home\site\wwwroot\server.js:160665:35)
at _createClass (D:\home\site\wwwroot\server.js:25362:20)
at _createProviderInstance (D:\home\site\wwwroot\server.js:25332:26)
at resolveNgModuleDep (D:\home\site\wwwroot\server.js:25296:21)

Expected/desired behavior
Looks like the package isn't checking for existing directory before calling mkdirSync. Expect existing directory to be used and no error.

Minimal reproduction of the problem with instructions

@squelix
Copy link

squelix commented Mar 21, 2019

Any news about this bug ?

@paullryan
Copy link

There was a work around posted in fulls1z3/universal#631. Looks like it would make a good permanent fix as well.

@fulls1z3
Copy link
Owner

@frankiej45nz @squelix @paullryan sorry for the delay, had busy times. feel free to fire a PR and i'll approve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants