File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,10 @@ function buildAndInstallPlaywrightBdd() {
2323 fs . rmSync ( 'node_modules' , { recursive : true } ) ;
2424 // install playwright-bdd with peer dependencies (Playwright)
2525 // install typescript + @types/node to be able to run tsc in examples
26- runCmd ( `npm install --no-save ../${ generatedTar } typescript @types/node` , { cwd } ) ;
26+ runCmd (
27+ `npm install --no-save ../${ generatedTar } typescript @types/node@${ getMajorNodeVersion ( ) } ` ,
28+ { cwd } ,
29+ ) ;
2730 // install playwright browsers
2831 runCmd ( `npx playwright install --with-deps chromium` , { cwd } ) ;
2932 } else {
@@ -39,3 +42,7 @@ function runCmd(cmd, opts = {}) {
3942 logger . log ( `Running: ${ cmd } ` ) ;
4043 execSync ( cmd , { ...opts , stdio : 'inherit' } ) ;
4144}
45+
46+ function getMajorNodeVersion ( ) {
47+ return process . versions . node . split ( '.' ) [ 0 ] ;
48+ }
You can’t perform that action at this time.
0 commit comments