-
Notifications
You must be signed in to change notification settings - Fork 164
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
docs: remove warning about packageManager and pnpm default #245
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,6 @@ jobs: | |
- name: Deploy | ||
uses: cloudflare/wrangler-action@v3 | ||
with: | ||
packageManager: pnpm # you can omit this if you use npm | ||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
``` | ||
|
||
|
@@ -53,10 +52,6 @@ jobs: | |
|
||
## Configuration | ||
|
||
### packageManager | ||
|
||
⚠️ you must specify package manager. If not specified GH action assumes you are using npm and other managers might be failing. For example pnpm will fail with: `Cannot read properties of null (reading 'matches')` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree that we should drop this paragraph, but we should completely undocument the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The original intent here was mainly to just revert #242, but I've added a short blurb about There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you, James! |
||
|
||
If you need to install a specific version of Wrangler to use for deployment, you can also pass the input `wranglerVersion` to install a specific version of Wrangler from NPM. This should be a [SemVer](https://semver.org/)-style version number, such as `2.20.0`: | ||
|
||
```yaml | ||
|
@@ -273,6 +268,23 @@ The resulting output will look something like this: | |
https://<your_pages_site>.pages.dev | ||
``` | ||
|
||
### Using a different package manager | ||
|
||
By default, this action will detect which package manager to use, based on the presence of a `package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`, or `bun.lockb` file. | ||
IgorMinar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
If you need to use a specific package manager for your application, you can set the `packageManager` input to `npm`, `yarn`, `pnpm`, or `bun`. You don't need to set this option unless you want to override the default behavior. | ||
|
||
IgorMinar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
```yaml | ||
jobs: | ||
deploy: | ||
steps: | ||
uses: cloudflare/wrangler-action@v3 | ||
with: | ||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
packageManager: pnpm | ||
``` | ||
|
||
## Troubleshooting | ||
|
||
### "I just started using Workers/Wrangler and I don't know what this is!" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, we
shouldshouldn't be forcing this on devsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo, and I assume you mean "shouldn't"? If so, agreed!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops.. yup. shouldn't