jfromaniello/url-join

SyntaxError: Unexpected token 'export'

harsha09 opened this issue · 1 comments

When working with Jest I've encountered the below error message.

SyntaxError: Unexpected token 'export'

> 1 | import urlJoin from 'url-join';

adding "node_modules/(?!(url-join)/)" in transformIgnorePatterns did not help.

You'll have to run Jest in ESM mode or include the dependency explicitly to transform it into CommonJS. More information can be found in the Jest documentation.