New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Error when importing 'gun/lib/time.js' in nodejs #1360
Comments
Hello @matubu, Thank you for reporting this issue. It seems like the 'gun/lib/time.js' module is trying to access a property of One possible solution could be to ensure that As a workaround, you might want to consider importing the entire 'gun' library instead of specific modules. This should ensure that all dependencies are correctly initialized: import Gun from 'gun';
Then, you can access the time function via Gun.time.
Please note that this is just a suggestion and might not work depending on the specifics of your project. I would also recommend reaching out to the maintainers of the ‘gun’ library for more guidance.
Sincerely,
Simardeep Singh |
When I attempt to import
'gun/lib/time.js'
within Node.js, I encounter the following error. Here is a minimal reproducible example:This error occurs both when importing using the
require
andimport
syntax. Additionally, the error persists when attempting to import'gun'
instead of'gun/gun.js'
. However, it does not occur when running the code in the browser using a script tag to import gun as shown below:The text was updated successfully, but these errors were encountered: