Account for dynamic require in Rollup

I’m trying to build a project, but I have a problem.

This is the structure of my project:

.
├── deps
│   ├── deps.js
│   └── package.json
└── module1
    ├── mod1.js
    ├── package.json
    ├── rollup.config.js
    └── test.js

mod1.js is using a dynamic require to import deps.js.

When I test my code, I get this error:

Error: Could not dynamically require “deps”. Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.

Can anyone help me?

I configured my Rollup with this:
`


commonjs({
    dynamicRequireTargets: [
        "../deps/deps.js",
    ],
})

but it’s still not working.