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: Some Next.js applications cannot be built because they load the wrong export from 3rd party packages #6742

Closed
petebacondarwin opened this issue Sep 17, 2024 · 0 comments · Fixed by #6743 or #6765
Labels
bug Something that isn't working

Comments

@petebacondarwin
Copy link
Contributor

Which Cloudflare product(s) does this pertain to?

Wrangler

What version(s) of the tool(s) are you using?

latest

What version of Node are you using?

any

What operating system and version are you using?

any

Describe the Bug

Observed behavior

When building some Next.js applications, the default esbuild build conditions cause the wrong 3rd party package export to be imported.

Expected behavior

Wrangler is able to use different build conditions on a per project basis.

Please provide a link to a minimal reproduction

No response

Please provide any relevant error logs

No response

@petebacondarwin petebacondarwin added the bug Something that isn't working label Sep 17, 2024
renovate bot referenced this issue in Johannes-Andersen/Johannes Sep 19, 2024
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [wrangler](https://redirect.github.com/cloudflare/workers-sdk)
([source](https://redirect.github.com/cloudflare/workers-sdk/tree/HEAD/packages/wrangler))
| [`3.78.5` ->
`3.78.6`](https://renovatebot.com/diffs/npm/wrangler/3.78.5/3.78.6) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/wrangler/3.78.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/wrangler/3.78.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/wrangler/3.78.5/3.78.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/wrangler/3.78.5/3.78.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>cloudflare/workers-sdk (wrangler)</summary>

###
[`v3.78.6`](https://redirect.github.com/cloudflare/workers-sdk/blob/HEAD/packages/wrangler/CHANGELOG.md#3786)

[Compare
Source](https://redirect.github.com/cloudflare/workers-sdk/compare/wrangler@3.78.5...wrangler@3.78.6)

##### Patch Changes

-
[#&#8203;6743](https://redirect.github.com/cloudflare/workers-sdk/pull/6743)
[`b45e326`](https://redirect.github.com/cloudflare/workers-sdk/commit/b45e32695cc1b4d5c5fb84384cff30a15f744bb3)
Thanks
[@&#8203;petebacondarwin](https://redirect.github.com/petebacondarwin)!
- fix: ability to build tricky Node.js compat scenario Workers

Adds support for non-default build conditions and platform via the
WRANGLER_BUILD_CONDITIONS and WRANGLER_BUILD_PLATFORM flags.

Fixes
[https://github.com/cloudflare/workers-sdk/issues/6742](https://redirect.github.com/cloudflare/workers-sdk/issues/6742)

-
[#&#8203;6776](https://redirect.github.com/cloudflare/workers-sdk/pull/6776)
[`02de103`](https://redirect.github.com/cloudflare/workers-sdk/commit/02de103435689c552e231a2ae2249adeb5f60a8b)
Thanks [@&#8203;zebp](https://redirect.github.com/zebp)! - fix: disable
observability on deploy if not explicitly defined in config

When deploying a Worker that has observability enabled in the deployed
version but not specified in the `wrangler.toml` Wrangler will now set
observability to disabled for the new version to match the
`wrangler.toml` as the source of truth.

- Updated dependencies
\[[`2ddbb65`](https://redirect.github.com/cloudflare/workers-sdk/commit/2ddbb65033e88dfc2127a093fc894ac91bd96369)]:
    -   miniflare@3.20240909.4

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/Johannes-Andersen/Johannes).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44MC4wIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsidHlwZS9kZXBlbmRlbmNpZXMiXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Brooooooklyn referenced this issue in toeverything/affine-workers Sep 21, 2024
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@cloudflare/workers-types](https://redirect.github.com/cloudflare/workerd) | [`4.20240909.0` -> `4.20240919.0`](https://renovatebot.com/diffs/npm/@cloudflare%2fworkers-types/4.20240909.0/4.20240919.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@cloudflare%2fworkers-types/4.20240919.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@cloudflare%2fworkers-types/4.20240919.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@cloudflare%2fworkers-types/4.20240909.0/4.20240919.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@cloudflare%2fworkers-types/4.20240909.0/4.20240919.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [pnpm](https://pnpm.io) ([source](https://redirect.github.com/pnpm/pnpm)) | [`9.10.0` -> `9.11.0`](https://renovatebot.com/diffs/npm/pnpm/9.10.0/9.11.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/pnpm/9.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/pnpm/9.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/pnpm/9.10.0/9.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/pnpm/9.10.0/9.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [tldts](https://redirect.github.com/remusao/tldts) | [`6.1.46` -> `6.1.47`](https://renovatebot.com/diffs/npm/tldts/6.1.46/6.1.47) | [![age](https://developer.mend.io/api/mc/badges/age/npm/tldts/6.1.47?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/tldts/6.1.47?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/tldts/6.1.46/6.1.47?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/tldts/6.1.46/6.1.47?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [wrangler](https://redirect.github.com/cloudflare/workers-sdk) ([source](https://redirect.github.com/cloudflare/workers-sdk/tree/HEAD/packages/wrangler)) | [`3.78.5` -> `3.78.7`](https://renovatebot.com/diffs/npm/wrangler/3.78.5/3.78.7) | [![age](https://developer.mend.io/api/mc/badges/age/npm/wrangler/3.78.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/wrangler/3.78.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/wrangler/3.78.5/3.78.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/wrangler/3.78.5/3.78.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>cloudflare/workerd (@&#8203;cloudflare/workers-types)</summary>

### [`v4.20240919.0`](https://redirect.github.com/cloudflare/workerd/compare/141ec389db82bec0aa9ef6970aee85b5ff7713e6...b41ed0bfcce9b811f0c9142abe33ace2779e7b42)

[Compare Source](https://redirect.github.com/cloudflare/workerd/compare/141ec389db82bec0aa9ef6970aee85b5ff7713e6...b41ed0bfcce9b811f0c9142abe33ace2779e7b42)

</details>

<details>
<summary>pnpm/pnpm (pnpm)</summary>

### [`v9.11.0`](https://redirect.github.com/pnpm/pnpm/compare/v9.10.0...v9.11.0)

[Compare Source](https://redirect.github.com/pnpm/pnpm/compare/v9.10.0...v9.11.0)

</details>

<details>
<summary>remusao/tldts (tldts)</summary>

### [`v6.1.47`](https://redirect.github.com/remusao/tldts/blob/HEAD/CHANGELOG.md#v6147-Thu-Sep-19-2024)

[Compare Source](https://redirect.github.com/remusao/tldts/compare/v6.1.46...v6.1.47)

##### 📜 Update Public Suffix List

-   `tldts-experimental`, `tldts`
    -   Update upstream public suffix list [#&#8203;2154](https://redirect.github.com/remusao/tldts/pull/2154) ([@&#8203;remusao](https://redirect.github.com/remusao))

##### 🔩 Dependencies

-   Bump nyc from 17.0.0 to 17.1.0 [#&#8203;2156](https://redirect.github.com/remusao/tldts/pull/2156) ([@&#8203;dependabot\[bot\]](https://redirect.github.com/dependabot\[bot]))
-   Bump eslint from 8.57.0 to 8.57.1 [#&#8203;2155](https://redirect.github.com/remusao/tldts/pull/2155) ([@&#8203;dependabot\[bot\]](https://redirect.github.com/dependabot\[bot]))
-   Bump [@&#8203;types/node](https://redirect.github.com/types/node) from 22.5.4 to 22.5.5 [#&#8203;2153](https://redirect.github.com/remusao/tldts/pull/2153) ([@&#8203;dependabot\[bot\]](https://redirect.github.com/dependabot\[bot]))

##### Authors: 2

-   [@&#8203;dependabot\[bot\]](https://redirect.github.com/dependabot\[bot])
-   Rémi ([@&#8203;remusao](https://redirect.github.com/remusao))

***

</details>

<details>
<summary>cloudflare/workers-sdk (wrangler)</summary>

### [`v3.78.7`](https://redirect.github.com/cloudflare/workers-sdk/blob/HEAD/packages/wrangler/CHANGELOG.md#3787)

[Compare Source](https://redirect.github.com/cloudflare/workers-sdk/compare/wrangler@3.78.6...wrangler@3.78.7)

##### Patch Changes

-   [#&#8203;6775](https://redirect.github.com/cloudflare/workers-sdk/pull/6775) [`ecd82e8`](https://redirect.github.com/cloudflare/workers-sdk/commit/ecd82e8471688901307c3bbbab8a382eb9d04811) Thanks [@&#8203;CarmenPopoviciu](https://redirect.github.com/CarmenPopoviciu)! - fix: Support switching between static and dynamic Workers

    This commit fixes the current behaviour of watch mode for Workers with assets, and adds support for switching between static and dynamic Workers within a single `wrangler dev` session.

-   [#&#8203;6762](https://redirect.github.com/cloudflare/workers-sdk/pull/6762) [`2840b9f`](https://redirect.github.com/cloudflare/workers-sdk/commit/2840b9f80c1b8fe66489eb6d749c38f6ece2779d) Thanks [@&#8203;petebacondarwin](https://redirect.github.com/petebacondarwin)! - fix: error if a user inadvertently uploads a Pages `_workers.js` file or directory as an asset

-   [#&#8203;6778](https://redirect.github.com/cloudflare/workers-sdk/pull/6778) [`61dd93a`](https://redirect.github.com/cloudflare/workers-sdk/commit/61dd93aaacac8b421b4ffcf7cde59ed6b651fc1b) Thanks [@&#8203;CarmenPopoviciu](https://redirect.github.com/CarmenPopoviciu)! - fix: Error if Workers + Assets are run in remote mode

    Workers + Assets are currently supported only in local mode. We should throw an error if users attempt to use Workers with assets in remote mode.

-   [#&#8203;6782](https://redirect.github.com/cloudflare/workers-sdk/pull/6782) [`7655505`](https://redirect.github.com/cloudflare/workers-sdk/commit/7655505654400c8525e4b0164e4e5b3b3c20bed4) Thanks [@&#8203;vicb](https://redirect.github.com/vicb)! - chore: update unenv dependency version

-   [#&#8203;6777](https://redirect.github.com/cloudflare/workers-sdk/pull/6777) [`9649dbc`](https://redirect.github.com/cloudflare/workers-sdk/commit/9649dbc74d022fa5fdb065cf3e7a8d6d791f0a88) Thanks [@&#8203;penalosa](https://redirect.github.com/penalosa)! - chore: Update CI messaging

-   [#&#8203;6779](https://redirect.github.com/cloudflare/workers-sdk/pull/6779) [`3e75612`](https://redirect.github.com/cloudflare/workers-sdk/commit/3e75612ffb5e422021d1d3b172e5dc93a4b7c48a) Thanks [@&#8203;emily-shen](https://redirect.github.com/emily-shen)! - fix: include asset binding in `wrangler types`

### [`v3.78.6`](https://redirect.github.com/cloudflare/workers-sdk/blob/HEAD/packages/wrangler/CHANGELOG.md#3786)

[Compare Source](https://redirect.github.com/cloudflare/workers-sdk/compare/wrangler@3.78.5...wrangler@3.78.6)

##### Patch Changes

-   [#&#8203;6743](https://redirect.github.com/cloudflare/workers-sdk/pull/6743) [`b45e326`](https://redirect.github.com/cloudflare/workers-sdk/commit/b45e32695cc1b4d5c5fb84384cff30a15f744bb3) Thanks [@&#8203;petebacondarwin](https://redirect.github.com/petebacondarwin)! - fix: ability to build tricky Node.js compat scenario Workers

    Adds support for non-default build conditions and platform via the WRANGLER_BUILD_CONDITIONS and WRANGLER_BUILD_PLATFORM flags.

    Fixes [https://github.com/cloudflare/workers-sdk/issues/6742](https://redirect.github.com/cloudflare/workers-sdk/issues/6742)

-   [#&#8203;6776](https://redirect.github.com/cloudflare/workers-sdk/pull/6776) [`02de103`](https://redirect.github.com/cloudflare/workers-sdk/commit/02de103435689c552e231a2ae2249adeb5f60a8b) Thanks [@&#8203;zebp](https://redirect.github.com/zebp)! - fix: disable observability on deploy if not explicitly defined in config

    When deploying a Worker that has observability enabled in the deployed version but not specified in the `wrangler.toml` Wrangler will now set observability to disabled for the new version to match the `wrangler.toml` as the source of truth.

-   Updated dependencies \[[`2ddbb65`](https://redirect.github.com/cloudflare/workers-sdk/commit/2ddbb65033e88dfc2127a093fc894ac91bd96369)]:
    -   miniflare@3.20240909.4

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/affine-workers).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44MC4wIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that isn't working
Projects
None yet
1 participant