You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
run jest inside X:\hostexecutor\datastore\ui\electron
Got error:
Error: Jest: Failed to parse the TypeScript config file C:\Users\buildbot\actcache\act\c43893a83296c120\hostexecutor\datastore\ui\electron\jest.config.ts
2024-04-09T07:23:29.9462295Z Error: Must use import to load ES Module: C:\Users\buildbot\actcache\act\c43893a83296c120\hostexecutor\datastore\ui\electron\jest.config.ts
2024-04-09T07:23:29.9472459Z require() of ES modules is not supported.
2024-04-09T07:23:29.9473523Z require() of C:\Users\buildbot\actcache\act\c43893a83296c120\hostexecutor\datastore\ui\electron\jest.config.ts from X:\hostexecutor\datastore\ui\electron\node_modules\jest-config\build
If subst is not used and test executed inside C:\Users\buildbot\actcache\act\c43893a83296c120\hostexecutor\datastore\ui\electron, it works fine.
Ideally X: should be used instead of C:\Users\buildbot\actcache\act\c43893a83296c120.
Expected behavior
test works even if virtual driver is used. Since this helps ccache etc.
Actual behavior
Error: Jest: Failed to parse the TypeScript config file C:\Users\buildbot\actcache\act\c43893a83296c120\hostexecutor\datastore\ui\electron\jest.config.ts
2024-04-09T07:23:29.9462295Z Error: Must use import to load ES Module: C:\Users\buildbot\actcache\act\c43893a83296c120\hostexecutor\datastore\ui\electron\jest.config.ts
2024-04-09T07:23:29.9472459Z require() of ES modules is not supported.
2024-04-09T07:23:29.9473523Z require() of C:\Users\buildbot\actcache\act\c43893a83296c120\hostexecutor\datastore\ui\electron\jest.config.ts from X:\hostexecutor\datastore\ui\electron\node_modules\jest-config\build
I see that the code linked in #8063 still uses realpath-native which is archived at 2020. Maybe change its use to node native realpath function is enough to fix the issue but this would require node 9.3 and later.
Version
29.7.0
Steps to reproduce
subst x: C:\Users\buildbot\actcache\act\c43893a83296c120
run jest inside X:\hostexecutor\datastore\ui\electron
Got error:
Error: Jest: Failed to parse the TypeScript config file C:\Users\buildbot\actcache\act\c43893a83296c120\hostexecutor\datastore\ui\electron\jest.config.ts
2024-04-09T07:23:29.9462295Z Error: Must use import to load ES Module: C:\Users\buildbot\actcache\act\c43893a83296c120\hostexecutor\datastore\ui\electron\jest.config.ts
2024-04-09T07:23:29.9472459Z require() of ES modules is not supported.
2024-04-09T07:23:29.9473523Z require() of C:\Users\buildbot\actcache\act\c43893a83296c120\hostexecutor\datastore\ui\electron\jest.config.ts from X:\hostexecutor\datastore\ui\electron\node_modules\jest-config\build
If subst is not used and test executed inside C:\Users\buildbot\actcache\act\c43893a83296c120\hostexecutor\datastore\ui\electron, it works fine.
Ideally X: should be used instead of C:\Users\buildbot\actcache\act\c43893a83296c120.
Expected behavior
test works even if virtual driver is used. Since this helps ccache etc.
Actual behavior
Error: Jest: Failed to parse the TypeScript config file C:\Users\buildbot\actcache\act\c43893a83296c120\hostexecutor\datastore\ui\electron\jest.config.ts
2024-04-09T07:23:29.9462295Z Error: Must use import to load ES Module: C:\Users\buildbot\actcache\act\c43893a83296c120\hostexecutor\datastore\ui\electron\jest.config.ts
2024-04-09T07:23:29.9472459Z require() of ES modules is not supported.
2024-04-09T07:23:29.9473523Z require() of C:\Users\buildbot\actcache\act\c43893a83296c120\hostexecutor\datastore\ui\electron\jest.config.ts from X:\hostexecutor\datastore\ui\electron\node_modules\jest-config\build
Additional context
No response
Environment
The text was updated successfully, but these errors were encountered: