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
Our projects use es6 module. Upgrading nightwatch 3.0.1 => 3.1.0 our test are failed.
The reason is the typescript does not transpile correctly the lib/utils/requireModule.js file.
The typescript compilation had been introduced with #3774 PR
The issue is still exists in the 3.1.2 version
The __importStar(require(s)) the typescript version uses the require.
I tried
upgrade typescript to 5.1.6 but it did not help
the "esModuleInterop": false typescript compiler option did not help
The only solution that came into my mind is copy the file to the dist folder after the ts build in the postbuild script.
The PR that I opened #3858
I hope you will find smarter solution.
Steps to reproduce
Go to '...'
Click on '...'
Scroll down to '...'
See error
Sample test
No response
Command to run
No response
Verbose Output
No response
Nightwatch Configuration
No response
Nightwatch.js Version
3.1.0
Node Version
No response
Browser
No response
Operating System
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered:
@ert78gb Based on the discussion in microsoft/TypeScript#43329, I think changing module config in tsconfig.json to Node16 would be the right way to fix this.
Description of the bug/issue
Our projects use es6 module. Upgrading
nightwatch
3.0.1 => 3.1.0 our test are failed.The reason is the typescript does not transpile correctly the
lib/utils/requireModule.js
file.The typescript compilation had been introduced with #3774 PR
The issue is still exists in the 3.1.2 version
The bogus transpiled code
The
__importStar(require(s))
the typescript version uses therequire
.I tried
"esModuleInterop": false
typescript compiler option did not helpThe only solution that came into my mind is copy the file to the dist folder after the ts build in the
postbuild
script.The PR that I opened #3858
I hope you will find smarter solution.
Steps to reproduce
Sample test
No response
Command to run
No response
Verbose Output
No response
Nightwatch Configuration
No response
Nightwatch.js Version
3.1.0
Node Version
No response
Browser
No response
Operating System
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: