Relative Content

Tag Archive for typescriptnext.jses6-modules

Modules are being reloaded on every import (not using cache)

When I try to import from a module in my NextJS custom server app such as import { registerStartOfGuildTriviaListener } from '@/lib/trivia-manager'; in more than one place, the module gets reloaded rather than using what has already been loaded. This is a problem for me because I am keeping some data in this module that I would like to use all over my app, but when I go to try and get that data elsewhere, it has been re-initialized and no longer exists.

Modules are being reloaded on every import (not using cache)

When I try to import from a module in my NextJS custom server app such as import { registerStartOfGuildTriviaListener } from '@/lib/trivia-manager'; in more than one place, the module gets reloaded rather than using what has already been loaded. This is a problem for me because I am keeping some data in this module that I would like to use all over my app, but when I go to try and get that data elsewhere, it has been re-initialized and no longer exists.