Closed maifeeulasad closed 3 months ago
Same issue:
Uncaught ReferenceError: require is not defined
@raul-ortega localbase is using browserify
, ref: https://github.com/dannyconnell/localbase/blob/master/package.json#L7-L8. This is why in some system it works; but in some system like vite
or vue (which runs on vite)
, although this library is working on dev environment, but in production it crashes.
I'm using vue3 + vite. I solved the issue following the commit of a PR: https://github.com/dannyconnell/localbase/pull/72/commits/2683c67066021a7c3eb301b4724753c014bb84bf
After building I renamed localbase.min.js as index.js and replaced the node_module index.js with it.
I'm facing same issue.
Uncaught ReferenceError: require is not defined
I'm facing the same issue.
Hello there, for those interested I decided to fork this project to continue its development as apparently it's now abandoned.
https://www.npmjs.com/package/mis-datos
So far I've:
I plan to:
I'm using vue3 + vite. I solved the issue following the commit of a PR: 2683c67
After building I renamed localbase.min.js as index.js and replaced the node_module index.js with it.
Could you also commit the new distribution files? localbase.min.js, etc
Hello there, for those interested I decided to fork this project to continue its development as apparently it's now abandoned.
https://www.npmjs.com/package/mis-datos
I plan to:
- [...]
- Keep it up to date and properly maintained.
Seems like this one is also gone now... 404
I'm using vue3 + vite. I solved the issue following the commit of a PR: 2683c67
After building I renamed localbase.min.js as index.js and replaced the node_module index.js with it.
I had the same issue with my Vite+Vue3+Pinia app. I reproduced your steps and somehow it works... In node_modules I did as follows:
import UUID from 'ordered-uuid'
instead of let UUID = require('ordered-uuid')
in node_modules/localbase/dist/: renamed "localbase.min.js" to "index.js" and moved it to node_modules/localbase/ directory (replacing existing index.js)
Maybe it will help somebody else... Thanks!
Closing here because it has been fixed in the version 0.7.6. https://github.com/dannyconnell/localbase/pull/84
Hello there, for those interested I decided to fork this project to continue its development as apparently it's now abandoned.
https://www.npmjs.com/package/mis-datos
So far I've:
- Updated packages
- Added this minor fix/workaround
- Updated minor things in the docs
- Added it to the NPM registry under a new name
- For the time being the internal name is still "localbase" to maintain compatibility and being able to use it as a drop-in replacement.
I plan to:
- Replace some packages for more modern or adequate ones
- Add several new features (secret for now)
- Ensure it stay fully open source and free (not becoming something like Dexie)
- Keep it up to date and properly maintained.
Hi do you still have the "secret" features? I'll be the maintaining this project.
localbase
raises issues during production build. It saysUncaught ReferenceError: require is not defined
.When I dug a little, I found out this is the code added after I added
localbase
as a dependency. Truncated generated codeTo reproduce: https://github.com/maifeeulasad/remanage/tree/c5c387cd664714d73179e5d7612c437441d65da1