How to use remote kv worker while running in local environment?

According to the docs, I have added the required flags

wrangler dev ./build/index.js --env production --experimental-local=true --experimental-local-remote-kv=true


Even after then it is still throwing this error:
✘ [ERROR] In development, you should use a separate kv namespace than the one you'd use in production. Please create a new kv namespace with "wrangler kv:namespace create <name> --preview" and add its id as preview_id to the kv_namespace "POSTS" in your wrangler.toml
Was this page helpful?