Skip to main content

Troubleshooting

If you are having an issue with running Test Evolve Spark, please contact the team for support.

Issues

Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import

Due to a change introduced in Node version 22.7.0, module syntax detection is now enabled by default.

You may see an error message like this:

Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import '/home/testevolve/workspace/spark-project/features/support/pages' is not supported resolving ES modules imported from /home/testevolve/workspace/spark-project/features/step_definitions/browserTestSteps.js
at finalizeResolution (node:internal/modules/esm/resolve:251:11)
at moduleResolve (node:internal/modules/esm/resolve:913:10)
at defaultResolve (node:internal/modules/esm/resolve:1037:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:650:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:599:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:582:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:241:38)
at ModuleJob._link (node:internal/modules/esm/module_job:132:49) {
code: 'ERR_UNSUPPORTED_DIR_IMPORT',
url: 'file:///home/testevolve/workspace/spark-project/features/support/pages'
}

To resolve this error, please add the type declaration to your package.json.

package.json
"type": "commonjs"