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

[ BUG ] simpleSiteMapAndIndex error #322

Closed
moonmeister opened this issue Jul 10, 2020 · 4 comments
Closed

[ BUG ] simpleSiteMapAndIndex error #322

moonmeister opened this issue Jul 10, 2020 · 4 comments

Comments

@moonmeister
Copy link

Describe the bug

       throw ex;
        ^

Error: ENOENT: no such file or directory, open 'C:\Users\Alex\code\moonmeister\moonmeister.net\public\sitemap.xml\sitemap-0.xml.gz'
Emitted 'error' event on WriteStream instance at:
    at errorOrDestroy (internal/streams/destroy.js:108:12)
    at WriteStream.onerror (_stream_readable.js:753:7)
    at WriteStream.emit (events.js:315:20)
    at internal/fs/streams.js:376:12
    at FSReqCallback.oncomplete (fs.js:155:23) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'open',
  path: 'C:\\Users\\Alex\\code\\moonmeister\\moonmeister.net\\public\\sitemap.xml\\sitemap-0.xml.gz'
}
error Command failed with exit code 7.

All day everyday. Wondering if it's a windows bug

Expected behavior
I'd expect it to no fail and write the files to disk.

Context:

  • Library 6.0.2

Additional context
Node LTS 12

@derduher
Copy link
Collaborator

based off the error it looks like you are passing a directory that does not exist. based off the name I think you were trying to pass a file to the directory argument.

@moonmeister
Copy link
Author

This is outputting (based on the defaults) to a build directory, it could not exist at any given build. I would expect sitemap be creating the destination directory if it doesn't exist, since it's handling all other file related things.

@derduher
Copy link
Collaborator

That makes sense. This particular wrapper is only a couple days old so there's bound to be usability bugs. I'll keep this open to change that behavior but once you changed the path did things work ok for you?

@moonmeister
Copy link
Author

Yeah, changing the path to an existing directory resolved the issue. Thanks for your work on this project, this simple function in particular is nice to have. I will add, it would be nice to have an option to not gzip the sitemaps.

derduher added a commit that referenced this issue Sep 6, 2020
recursively create destination dir fix #322
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

2 participants