Skip to content

DF0013: Shared State Not Found

Package: devframe

Message

Shared state of "{key}" is not found, please provide an initial value for the first time

Cause

RpcSharedStateHost.get() was called for a key that has no stored state yet, and no initialValue was passed.

Fix

Pass initialValue on the first call: ctx.rpc.sharedState.get(key, { initialValue: ... }).

Source

packages/devframe/src/node/rpc-shared-state.ts

Migrated from

Previously documented as DTK0027 under @vitejs/devtools.

Released under the MIT License.