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

Add info about node:${module} syntax for nodejs_compat #4485

Merged
merged 3 commits into from
Dec 18, 2023

Conversation

zmilonas
Copy link
Contributor

@zmilonas zmilonas commented Nov 22, 2023

What this PR solves / how to test:

This updates the error message to point the user that they might be missing node: in the module name for the imports, even if they enabled nodejs_compat in their project.

I'm open to changing the wording. This I did on a whim after receiving support from @KianNH on Discord which I thought might be worth highlighting in the error message.

It's about this error message from the CLI:

image

It can still occur when nodejs_compat is enabled but the imported package is not in the intended format - node:{moduleName}

Author has addressed the following:

Note for PR author:

We want to celebrate and highlight awesome PR review! If you think this PR received a particularly high-caliber review, please assign it the label highlight pr review so future reviewers can take inspiration and learn from it.

@zmilonas zmilonas requested a review from a team as a code owner November 22, 2023 11:59
Copy link

changeset-bot bot commented Nov 22, 2023

⚠️ No Changeset found

Latest commit: 52ae87a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@zmilonas zmilonas requested a review from a team as a code owner November 22, 2023 12:05
Copy link
Contributor

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6957022190/npm-package-wrangler-4485

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/6957022190/npm-package-wrangler-4485

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6957022190/npm-package-wrangler-4485 dev path/to/script.js
Additional artifacts:
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6957022190/npm-package-miniflare-4485
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6957022190/npm-package-cloudflare-pages-shared-4485

Note that these links will no longer work once the GitHub Actions artifact expires.


wrangler@3.17.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20231030.1
workerd 1.20231030.0 1.20231030.0
workerd --version 1.20231030.0 2023-10-30

|

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

Copy link

codecov bot commented Nov 22, 2023

Codecov Report

Merging #4485 (52ae87a) into main (382ef8f) will decrease coverage by 0.01%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4485      +/-   ##
==========================================
- Coverage   75.27%   75.27%   -0.01%     
==========================================
  Files         226      226              
  Lines       12568    12568              
  Branches     3260     3260              
==========================================
- Hits         9461     9460       -1     
- Misses       3107     3108       +1     
Files Coverage Δ
...s/wrangler/src/deployment-bundle/build-failures.ts 100.00% <ø> (ø)

... and 5 files with indirect coverage changes

@admah admah merged commit cd4f63a into cloudflare:main Dec 18, 2023
17 checks passed
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