Yesterday I ran npm init playwright@latest -- --ct
and it, as expected let me choose react, vue etc, created the configs and relevant files. Today, for some reason, it's running a standard playwright init, even on new projects, it never get an option to choose framework. The only thing that's changed is the node version, yesterday was 14, today i'm using 18. Anyone have any idea why I might be experiencing this / things I could check?
This thread is trying to answer question "Why is Init playwright component testing not working as expected with Node 18?"
It's a npm bug with Node 18, only with Powershell. https://github.com/npm/cli/issues/3136
I also had the issue and solved it by uninstalling 18.12.1 and install 18.16.1 Pretty straigthforward if you use nvm
> nvm uninstall 18.12.1
Uninstalling node v18.12.1... done
> nvm install 18
Downloading node.js version 18.16.1 (64-bit)...
Extracting node and npm...
Complete
npm v9.5.1 installed successfully.
Installation complete. If you want to use this version, type
nvm use 18.16.1
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].