-
Notifications
You must be signed in to change notification settings - Fork 803
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
Starting with --local
then turning off local mode crashes
#18
Comments
* 95% of Pages CLI * Bindings * Consistent descriptions * Tidy imports * Fix env.ASSETS.fetch * Add error for no Worker script * Linux support * Move dependencies to devDependencies * Cross-platform compatibility (stolen from Miniflare) * Use new functions package * Finish merging * Move external deps to real deps * Fix broken dep SHA? * Support on-the-fly pages dev * update package-lock.json with integrity hashes (generated by running npm install at the root) * Docs Co-authored-by: Sunil Pai <[email protected]>
A similar problem when passing |
Steps
Error
If it needs an account id, maybe should error out if |
Note that this is still an issue with version 2.0.7, and even if I previously logged in with wranger, AND actually specify an account_id in the wrangler.toml file (I also tried accountId). |
Previously, if you are not logged in when running `wrangler dev` it will only try to log you in if you start in "remote" mode. In "local" mode there is no need to be logged in, so it doesn't bother to try to login, and then will crash if you switch to "remote" mode interactively. The problem was that we were only attempting to login once before creating the `<Remote>` component. Now this logic has been moved into a `useEffect()` inside `<Remote>` so that it will be run whether starting in "remote" or transitioning to "remote" from "local". The fact that the check is no longer done before creating the components is proven by removing the `mockAccountId()` and `mockApiToken()` calls from the `dev.test.ts` files. Fixes [#18](cloudflare#18)
…#1212) Previously, if you are not logged in when running `wrangler dev` it will only try to log you in if you start in "remote" mode. In "local" mode there is no need to be logged in, so it doesn't bother to try to login, and then will crash if you switch to "remote" mode interactively. The problem was that we were only attempting to login once before creating the `<Remote>` component. Now this logic has been moved into a `useEffect()` inside `<Remote>` so that it will be run whether starting in "remote" or transitioning to "remote" from "local". The fact that the check is no longer done before creating the components is proven by removing the `mockAccountId()` and `mockApiToken()` calls from the `dev.test.ts` files. Fixes [#18](#18)
Since you're never prompted to login & choose your
accountId
, you don't get that norapitToken
in the session, and you get this errorThe text was updated successfully, but these errors were encountered: