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

NextJS: Fix import url on windows #19798

Merged
merged 1 commit into from
Nov 19, 2022
Merged

NextJS: Fix import url on windows #19798

merged 1 commit into from
Nov 19, 2022

Conversation

nix6839
Copy link
Contributor

@nix6839 nix6839 commented Nov 10, 2022

Issue: @storybook/nextjs package failed on windows with following error:

ERR! Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'

What I did

Use the file:// scheme using pathToFileURL() when dynamic import.

How to test

  • Is this testable with Jest or Chromatic screenshots?
  • Does this need a new example in the kitchen sink apps?
  • Does this need an update to the documentation?

If your answer is yes to any of these, please make sure to include it in your PR.

@shilman shilman merged commit 214ed3f into storybookjs:next Nov 19, 2022
@nix6839 nix6839 deleted the next-framework-invalid-url-on-windows branch November 20, 2022 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants