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 wrangler to package.json #3059

Merged
merged 3 commits into from
Jan 4, 2024
Merged

🔨 add wrangler to package.json #3059

merged 3 commits into from
Jan 4, 2024

Conversation

Marigold
Copy link
Contributor

@Marigold Marigold commented Jan 3, 2024

Running npx wrangler installs wrangler globally in the cache and could have unintended consequences (changing versions, etc.). Install it as dev dependency.

Related PR in ops https://github.com/owid/ops/pull/122

This should help with #3055 (review)

@Marigold Marigold requested a review from mlbrgl January 3, 2024 13:03
@Marigold Marigold removed the request for review from mlbrgl January 3, 2024 13:06
@Marigold Marigold marked this pull request as draft January 3, 2024 13:06
@@ -119,7 +119,7 @@ deploy_to_cloudflare() {
# for branch-specific non-production deploys, use `--branch master`
cd dist
# trim \r, they remove previous logs in buildkite
env $(grep "^CLOUDFLARE" ../owid-grapher/.env | xargs -0) npx wrangler pages deploy . --project-name "$PROJECT_NAME" 2>&1 | tr -d '\r'
env $(grep "^CLOUDFLARE" ../owid-grapher/.env | xargs -0) yarn wrangler pages deploy . --project-name "$PROJECT_NAME" 2>&1 | tr -d '\r'
Copy link
Member

@mlbrgl mlbrgl Jan 3, 2024

Choose a reason for hiding this comment

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

@Marigold did you manage to make this work? It should work in https://github.com/owid/ops/pull/122 since it is running from a full owid-grapher folder but it is here running from dist which doesn't have a package.json

Copy link
Contributor Author

@Marigold Marigold Jan 4, 2024

Choose a reason for hiding this comment

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

Sorry, I was in a hurry yesterday, messed up testing, requested your review and then made a draft out of it 🤦

I've changed it to node_modules/wrangler/bin/wrangler.js and left a comment about node_modules/.bin/wrangler. It should work now. Still figuring out why is it breaking.

Copy link
Member

Choose a reason for hiding this comment

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

no worries! I was commenting in case it's useful (also for me 🙂). I haven't run it in this context but the same command in deploy-content-preview works as expected, so ✅.

@Marigold Marigold marked this pull request as ready for review January 4, 2024 09:22
@Marigold Marigold merged commit e1e271c into master Jan 4, 2024
15 checks passed
@Marigold Marigold deleted the add-wrangler branch January 4, 2024 11:16
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.

2 participants