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

getAntiCSRFToken is updated to import from /rpc, should be auth. #3785

Closed
tmcw opened this issue Aug 23, 2022 · 1 comment
Closed

getAntiCSRFToken is updated to import from /rpc, should be auth. #3785

tmcw opened this issue Aug 23, 2022 · 1 comment
Labels
kind/bug Something isn't working status/done

Comments

@tmcw
Copy link
Contributor

tmcw commented Aug 23, 2022

What is the problem?

CleanShot 2022-08-23 at 16 46 15@2x

The docs and codemod are incorrect here - getAntiCSRFToken got moved to auth, not rpc

Paste all your error logs here:

app/lib/replicache/blitz.ts:1:10 - error TS2305: Module '"@blitzjs/rpc"' has no exported member 'getAntiCSRFToken'.

1 import { getAntiCSRFToken } from "@blitzjs/rpc";

Paste all relevant code snippets here:

import { getAntiCSRFToken } from "@blitzjs/rpc";

What are detailed steps to reproduce this?

  1. Upgrade a codebase

Run blitz -v and paste the output here:

Blitz version: 2.0.0-beta.3 (local)
macOS Monterey | darwin-arm64 | Node: v16.16.0


 Package manager: npm

  System:
    OS: macOS 12.5.1
    CPU: (8) arm64 Apple M2
    Memory: 214.77 MB / 24.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.16.0 - ~/.volta/tools/image/node/16.16.0/bin/node
    Yarn: 1.22.19 - ~/.volta/tools/image/yarn/1.22.19/bin/yarn
    npm: 8.11.0 - ~/.volta/tools/image/node/16.16.0/bin/npm
  npmPackages:
    @blitzjs/auth: 2.0.0-beta.3 => 2.0.0-beta.3
    @blitzjs/next: 2.0.0-beta.3 => 2.0.0-beta.3
    @blitzjs/rpc: 2.0.0-beta.3 => 2.0.0-beta.3
    @prisma/client: ^4 => 4.2.1
    blitz: 2.0.0-beta.3 => 2.0.0-beta.3
    next: 12.2.0 => 12.2.0
    prisma: ^4 => 4.2.1
    react: ^18.0.0 => 18.2.0
    react-dom: ^18.0.0 => 18.2.0
    typescript: ~4.6 => 4.6.4

Please include below any other applicable logs and screenshots that show your problem:

No response

@tmcw tmcw added kind/bug Something isn't working status/triage labels Aug 23, 2022
@beerose
Copy link
Contributor

beerose commented Aug 24, 2022

Fixed in #3788

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working status/done
Projects
None yet
Development

No branches or pull requests

3 participants