Hey,
I want to import a module from a file.ts from utils folder to use it in my services server in a strapi plugin.
But when i import it with "const module = require(’…/…/…/…/utils/myFile’), i get a error that say :
"error : Could not load js config file …/myPlugins/strapi-server.js : Cannot find module ‘…/…/…/…/utils/myFile’)
Someone has an idea how my module can be accessible to my services ?
I can’t use this format import because my plugin is in JS.
I got a import format error : ‘Cannot use import statement outside a module’
That’s why i use the require format for imports, but he can’t find my module.