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

fix: normalize injected import paths on windows #412

Merged

Conversation

james-elicx
Copy link
Contributor

This PR does the following:

  • Normalizes the import paths that get injected on Windows machines.

This should hopefully resolve the following issue that I believe is caused by backslashes in Windows path names:

[X [ERROR] Could not resolve "......__next-on-pages-dist__webpackee2d6a0d46f7afe4402d9e841f4a3be3.js"

    <stdin>:1:124:
      1 │ ...838 } from '..\..\..\__next-on-pages-dist__\webpack\ee2d6a0d46f7...
        ╵               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "......__next-on-pages-dist__webpackee2d6a0d46f7afe4402d9e841f4a3be3.js" as external to exclude it from the bundle, which will remove this error.

@changeset-bot
Copy link

changeset-bot bot commented Jul 29, 2023

🦋 Changeset detected

Latest commit: 8bdf62a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@cloudflare/next-on-pages Patch
eslint-plugin-next-on-pages Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

🧪 Prereleases are available for testing 🧪

@cloudflare/next-on-pages

You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/next-on-pages/runs/5702113242/npm-package-next-on-pages-412

@cloudflare/eslint-plugin-next-on-pages

You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/next-on-pages/runs/5702113242/npm-package-eslint-plugin-next-on-pages-412

@DeJayDev
Copy link

As a Windows user with this issue I can confirm this prerelease fixes the issue :)

Copy link
Member

@dario-piotrowicz dario-piotrowicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome! 😄👍

Thanks a lot @james-elicx 😄

@dario-piotrowicz dario-piotrowicz merged commit 3affd17 into cloudflare:main Jul 31, 2023
@james-elicx james-elicx deleted the james/normalize-imports branch July 31, 2023 11:18
Kebab11noel pushed a commit to Likespace-Kft/next-on-pages that referenced this pull request Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants