so need a monorepo to handle multiple workers
so need a monorepo to handle multiple workers
npx wrangler login today? It was working fine yesterday, but dtoday I'm getting a non-json response back from the API SyntaxError: Unexpected token < in JSON at position 0
--persist-to to point them both to the same directory. As long as they have the same ID, they should pull from the same placeenv.R2.get(...)). And appears the encoding is borked somewhere along the way. I can see that the file is not corrupted on the disk (within the .wrangler folder) but when I download the file, via the worker, it "corrupts". I the screenshot attached, the left is the original file, and the right is after downloading from R2. It's worth mentioning that if I upload a text file (eg. xml) - it works fine.
wrangler d1 execute <DBNAME> --remote --file=./creation_insertion_stmts.sqlPRAGMA foreign_keys=OFF;D1ās foreign key enforcement is equivalent to SQLiteās PRAGMA foreign_keys = on directive. Because D1 runs every query inside an implicit transaction, user queries cannot change this during a query or migration.
defer_foreign_keys thoughBEGIN TRANSACTION; and COMMIT; as well. I'll review that allowlist. Thanks again, I've been able to import everything remotely now.
wrangler within a project, then calling it from there, so that you consitently use the same versionnpm doesn't actually support that for arbitrary commands, so npx would probably be the next best thing.pnpm for arbitrary command execution using the locally installed package: pnpm wrangler deploy [whatever]npx wrangler loginSyntaxError: Unexpected token < in JSON at position 0env.R2.get(...).wranglerwrangler d1 execute <DBNAME> --remote --file=./creation_insertion_stmts.sql ā
ļø wrangler 3.57.0
-------------------
ā ā ļø This process may take some time, during which your D1 database will be unavailable to serve queries.
Ok to proceed? ⦠yes
š Executing on remote database <DBNAME> (***):
š To execute on your local development database, remove the --remote flag from your wrangler command.
Note: if the execution fails to complete, your DB will return to its original state and you can safely retry.
š File already uploaded. Processing.
š Starting import...
š not authorized
ā [ERROR]
Starting import...
not authorizedPRAGMA foreign_keys=OFF;defer_foreign_keysBEGIN TRANSACTION;COMMIT;npx wrangler deploy --dry-run --outdir=distā [ERROR] Unknown arguments: dry-run, dryRun, outdir, deploywrangler --version
ā
ļø wrangler 3.57.0npx wrangler deploy --dry-run --outdir=dist
ā
ļø wrangler 3.57.0
-------------------
ā [ERROR] Missing entry-point: The entry-point should be specified via the command line (e.g. `wrangler deploy path/to/script`) or the `main` config field.wrangler
Commands:
wrangler docs [command..] š Open wrangler's docs in your browser
wrangler init [name] š„ Initialize a basic Worker project, including a wrangler.toml file
wrangler generate [name] [template] ⨠Generate a new Worker project from an existing Worker template. See https://github.com/cloudflare/templates
wrangler dev [script] š Start a local server for developing your worker
wrangler publish [script] š Publish your Worker to Cloudflare.
wrangler delete [script] š Delete your Worker from Cloudflare.
wrangler tail [worker] š¦ Starts a log tailing session for a published Worker.
...elided...
wrangler login š Login to Cloudflare
wrangler logout šŖ Logout from Cloudflare
wrangler whoami šµļø Retrieve your user info and test your auth config
wrangler types š Generate types from bindings & module rules in config
wrangler deployments š¢ List and view details for deployments
wrangler rollback [deployment-id] š Rollback a deployment
...npx wrangler deploy
ā [ERROR] Unknown argument: deploynpx wrangler --version
ā
ļø wrangler 2.21.1 (update available 3.57.0)
-------------------------------------------------------
andrew@amackenz-mac collectr % wrangler --version
ā
ļø wrangler 3.57.0
-------------------npmnpxpnpm wrangler deploy [whatever]