Instructions in CONTRIBUTING.md don't seem to work out of the box
What is your Scenario?
When trying to contribute to TestCafe, I'm following the instructions from CONTRIBUTING.md. Namely, I do npm install, then npx gulp build. This is enough to test a modified version of TestCafe against my project via npm link, but I was more interested in running the test suite. Using a freshly git pulled version of TestCafe.
What is the Current behavior?
-
npm installwithout--legacy-peer-depsfails
vagrant@vagrant:~/workspace$ cat /home/vagrant/.npm/eresolve-report.txt # npm resolution error report 2022-05-13T12:42:36.300Z While resolving: @typescript-eslint/[email protected] Found: @typescript-eslint/[email protected] node_modules/@typescript-eslint/parser dev @typescript-eslint/parser@"^3.10.1" from the root project Could not resolve dependency: peer @typescript-eslint/parser@"^1.9.0" from @typescript-eslint/[email protected] node_modules/@typescript-eslint/eslint-plugin dev @typescript-eslint/eslint-plugin@"1.13.0" from the root project Conflicting peer dependency: @typescript-eslint/[email protected] node_modules/@typescript-eslint/parser peer @typescript-eslint/parser@"^1.9.0" from @typescript-eslint/[email protected] node_modules/@typescript-eslint/eslint-plugin dev @typescript-eslint/eslint-plugin@"1.13.0" from the root project Fix the upstream dependency conflict, or retry this command with --force, or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution.{ "code": "ERESOLVE", "edge": { "type": "peer", "name": "@typescript-eslint/parser", "spec": "^1.9.0", "error": "INVALID", "from": { "name": "@typescript-eslint/eslint-plugin", "version": "1.13.0", "location": "node_modules/@typescript-eslint/eslint-plugin", "isWorkspace": false, "dependents": [ { "type": "dev", "name": "@typescript-eslint/eslint-plugin", "spec": "1.13.0", "from": { "location": "/home/vagrant/workspace" } } ] } }, "dep": { "name": "@typescript-eslint/parser", "version": "1.13.0", "whileInstalling": { "name": "@typescript-eslint/eslint-plugin", "version": "1.13.0", "path": "/home/vagrant/workspace/node_modules/@typescript-eslint/eslint-plugin" }, "location": "node_modules/@typescript-eslint/parser", "isWorkspace": false, "dependents": [ { "type": "peer", "name": "@typescript-eslint/parser", "spec": "^1.9.0", "error": "INVALID", "from": { "name": "@typescript-eslint/eslint-plugin", "version": "1.13.0", "location": "node_modules/@typescript-eslint/eslint-plugin", "isWorkspace": false, "dependents": [ { "type": "dev", "name": "@typescript-eslint/eslint-plugin", "spec": "1.13.0", "from": { "location": "/home/vagrant/workspace" } } ] } } ] }, "current": { "name": "@typescript-eslint/parser", "version": "3.10.1", "location": "node_modules/@typescript-eslint/parser", "isWorkspace": false, "dependents": [ { "type": "dev", "name": "@typescript-eslint/parser", "spec": "^3.10.1", "from": { "location": "/home/vagrant/workspace" } } ] }, "peerConflict": { "current": { "name": "@typescript-eslint/parser", "version": "3.10.1", "location": "node_modules/@typescript-eslint/parser", "isWorkspace": false, "dependents": [ { "type": "dev", "name": "@typescript-eslint/parser", "spec": "^3.10.1", "from": { "location": "/home/vagrant/workspace" } } ] }, "peer": { "name": "@typescript-eslint/parser", "version": "1.13.0", "whileInstalling": { "name": "@typescript-eslint/eslint-plugin", "version": "1.13.0", "path": "/home/vagrant/workspace/node_modules/@typescript-eslint/eslint-plugin" }, "location": "node_modules/@typescript-eslint/parser", "isWorkspace": false, "dependents": [ { "type": "peer", "name": "@typescript-eslint/parser", "spec": "^1.9.0", "error": "INVALID", "from": { "name": "@typescript-eslint/eslint-plugin", "version": "1.13.0", "location": "node_modules/@typescript-eslint/eslint-plugin", "isWorkspace": false, "dependents": [ { "type": "dev", "name": "@typescript-eslint/eslint-plugin", "spec": "1.13.0", "from": { "location": "/home/vagrant/workspace" } } ] } } ] } }, "strictPeerDeps": false, "force": false, "isMine": true } -
There is no information about what software I need to have installed. The test suite assumes I have all the browsers that TestCafe supports, or at least Chrome and IE.
-
Running a single functional test suite, e.g.
gulp test-functional-local-headless-firefox, doesn't pass out of the box.
What is the Expected behavior?
- There should ideally be some more instructions about what to install
- Running
npm installshouldn't require the--legacy-peer-depsflag - Functional test suites should work out of the box
What is your public website URL? (or attach your complete example)
What is your TestCafe test code?
I run this on Linux, in Vagrant, with Parallels Desktop (although VirtualBox should produce similar results). Below is my Vagrantfile:
Vagrant.configure("2") do |config|
config.vm.provider "parallels" do |v|
v.memory = "4096"
v.cpus = 4
end
config.vm.box = "mpasternak/focal64-arm"
config.vm.provision "shell", inline: "echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p"
config.vm.provision "shell", inline: "curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -"
config.vm.provision "shell", inline: "sudo apt-get update"
# Install node and browsers
config.vm.provision "shell", inline: "sudo apt-get install nodejs chromium-browser firefox -y"
# Install TestCafe dependencies as close as I could match the ones listed in the Dockerfile
config.vm.provision "shell", inline: "sudo apt-get install libevent-dev x11-utils xvfb dbus fluxbox procps tzdata udev fonts-freefont-ttf -y"
config.vm.synced_folder '.', '/home/vagrant/workspace'
end
The Vagrantfile, as it's currently written, should go in the root folder of TestCafe, then TestCafe will end up in ~/workspace once you vagrant up && vagrant ssh.
Your complete configuration file
No response
Your complete test report
No response
Screenshots
No response
Steps to Reproduce
- Create a Vagrantfile with the content above
- Run the image with
vagrant up - SSH into the virtual machine with
vagrant ssh cd workspace, then runnpm install
TestCafe version
Node.js version
No response
Command-line arguments
Browser name(s) and version(s)
No response
Platform(s) and version(s)
No response
Other
No response
Hi @vergilfromadyen
Thank you for pointing this out. We will update this thread as soon as we have any news about the issues.