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

onSuccess callback not working on Windows #477

Closed
capsloq opened this issue Jun 4, 2023 · 2 comments
Closed

onSuccess callback not working on Windows #477

capsloq opened this issue Jun 4, 2023 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed meta: stale topic: windows

Comments

@capsloq
Copy link

capsloq commented Jun 4, 2023

I know Windows is not fully supported however this node error may be prevented by using file:// on Windows

Reproduce:

  1. Use Windows System
  2. Use a onSuccess Callback
export default makeSource({
  onExtraFieldData: 'ignore',
  contentDirPath: 'mdx',
  /*              ^^^^^^^ Directory with the Markdown files. */
  documentTypes: [Post, Rezept],
  onSuccess: async (importData) => {
    const {allDocuments} = await importData()
    console.log('allDocuments', allDocuments.length)
  },
})
  1. Error in Console
successCallback F:/Projekte/contentlayer-test/.contentlayer
SuccessCallbackError: Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file and data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'f:'
@schickling schickling added topic: windows bug Something isn't working help wanted Extra attention is needed labels Jun 29, 2023
@stale
Copy link

stale bot commented Aug 29, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@zS1m
Copy link

zS1m commented Oct 14, 2023

Same problem here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed meta: stale topic: windows
Projects
None yet
Development

No branches or pull requests

3 participants