You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Backport the storage.js isBrowser guard to 0.2.x (Node 25+ localStorage ExperimentalWarning) #146
On Node.js 25+, reading the global localStorage without --localstorage-file emits a warning:
ExperimentalWarning: localStorage is not available because --localstorage-file was not provided.
storage.js reads it when the module loads, so every Node process that imports lib0 0.2.x prints the warning once. That includes everything that uses yjs 13. Serverless platforms log stderr as errors, so the warning appears as an error on every cold start.
main (1.0.0-rc) already fixes this: src/storage.js checks isBrowser first (f8427b1). The released yjs versions, 13.6.x and the 14 prereleases, still depend on lib0 ^0.2.x, and 0.2.119 still has the old check.
Would you consider backporting that guard to a 0.2.x release?
Repro (lib0 0.2.119, Node 26.7.0): node --trace-warnings -e "import('lib0/storage')". The stack trace points to storage.js:43.
Activity
guard localStorage usage - fixes #146
dmonad commentedon Nov 9, 2026
should be fixed now