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
When running a project in development that uses 'redux-persist-pouchdb' and creates an instance of PouchDBStorage, the following error is presented:
inherits_browser.js:6 Uncaught TypeError: Object prototype may only be an Object or null: undefined
at Function.create ()
at inherits2 (inherits_browser.js:6:31)
at ../Fnt/Web/JS/investira.react.ui/node_modules/pouchdb/lib/index-browser.es.js (index-browser.es.js:459:1)
at __init (chunk-AUZ3RYOM.js?v=d979b12c:15:56)
at ../Fnt/Web/JS/investira.react.ui/node_modules/redux-persist-pouchdb/dist/index.js (index.js:8:39)
at __require2 (chunk-AUZ3RYOM.js?v=d979b12c:18:50)
at index.js:55:19
npm create vite@latest
npm i redux-persist-pouchdb
Add <script>window.global ||= window;</script> in index.html
Add import PouchDBStorage from "redux-persist-pouchdb"; in App.jsx
Creates an instance PouchDBStorage()
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Discussed in #15131
Originally posted by mvaldetaro November 23, 2023
Describe the bug
When running a project in development that uses 'redux-persist-pouchdb' and creates an instance of PouchDBStorage, the following error is presented:
inherits_browser.js:6 Uncaught TypeError: Object prototype may only be an Object or null: undefined
at Function.create ()
at inherits2 (inherits_browser.js:6:31)
at ../Fnt/Web/JS/investira.react.ui/node_modules/pouchdb/lib/index-browser.es.js (index-browser.es.js:459:1)
at __init (chunk-AUZ3RYOM.js?v=d979b12c:15:56)
at ../Fnt/Web/JS/investira.react.ui/node_modules/redux-persist-pouchdb/dist/index.js (index.js:8:39)
at __require2 (chunk-AUZ3RYOM.js?v=d979b12c:18:50)
at index.js:55:19
Reproduction
https://stackblitz.com/edit/vitejs-vite-ernlsm?file=src%2FApp.jsx
Steps to reproduce
npm create vite@latest
npm i redux-persist-pouchdb
Add
<script>window.global ||= window;</script>
in index.htmlAdd import PouchDBStorage from "redux-persist-pouchdb"; in App.jsx
Creates an instance PouchDBStorage()
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: