Open matubu opened 5 months ago
Hello @matubu,
Thank you for reporting this issue. It seems like the 'gun/lib/time.js' module is trying to access a property of Gun.node
before it's defined, hence the TypeError: Cannot read properties of undefined (reading 'ify')
.
One possible solution could be to ensure that Gun.node
is properly initialized before importing 'gun/lib/time.js'. However, without knowing the internals of the 'gun' library, it's hard to provide a definitive solution.
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: