0
I am trying to pass a variable populated by the database, containing my route to require, but is giving the following error:
"Cannot find module 'views/Cadastros/Usuario'"
And these are the ways I tried to import and which unfortunately did not work
var component = require("" + listRouters[i].import).default
var component = await (await import(listRouters[i].import).default;
var component = import(listRouters[i].import)
Include more code details so the problem can be evaluated.
– Leandro Angelo
Which is the path of the module you want to add?
– Pbras
the path is this 'views/Entries/User'
– Gabriel Souza
within listRouters[i]. import have 'views/Registrations/User', normal import works well.
– Gabriel Souza