Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instructions in CONTRIBUTING.md don't seem to work out of the box #7029

Open
vergilfromadyen opened this issue May 13, 2022 · 1 comment
Open
Labels
AREA: docs An issue related to the product documentation. TYPE: enhancement The accepted proposal for future implementation.

Comments

@vergilfromadyen
Copy link
Contributor

vergilfromadyen commented May 13, 2022

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?

  1. npm install without --legacy-peer-deps fails
    Screenshot 2022-05-13 at 14 42 46

    vagrant@vagrant:~/workspace$ cat /home/vagrant/.npm/eresolve-report.txt
    # npm resolution error report
    
    2022-05-13T12:42:36.300Z
    
    While resolving: @typescript-eslint/eslint-plugin@1.13.0
    Found: @typescript-eslint/parser@3.10.1
    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/eslint-plugin@1.13.0
    node_modules/@typescript-eslint/eslint-plugin
      dev @typescript-eslint/eslint-plugin@"1.13.0" from the root project
    
    Conflicting peer dependency: @typescript-eslint/parser@1.13.0
    node_modules/@typescript-eslint/parser
      peer @typescript-eslint/parser@"^1.9.0" from @typescript-eslint/eslint-plugin@1.13.0
      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
    }
  2. 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.

  3. Running a single functional test suite, e.g. gulp test-functional-local-headless-firefox, doesn't pass out of the box.
    Screenshot 2022-05-13 at 14 59 14

What is the Expected behavior?

  • There should ideally be some more instructions about what to install
  • Running npm install shouldn't require the --legacy-peer-deps flag
  • 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

  1. Create a Vagrantfile with the content above
  2. Run the image with vagrant up
  3. SSH into the virtual machine with vagrant ssh
  4. cd workspace, then run npm 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

@vergilfromadyen vergilfromadyen added the TYPE: bug The described behavior is considered as wrong (bug). label May 13, 2022
@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label May 13, 2022
@miherlosev
Copy link
Collaborator

Hi @vergilfromadyen

Thank you for pointing this out. We will update this thread as soon as we have any news about the issues.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label May 16, 2022
@miherlosev miherlosev added TYPE: enhancement The accepted proposal for future implementation. and removed TYPE: bug The described behavior is considered as wrong (bug). labels May 16, 2022
@AndreyBelym AndreyBelym added the AREA: docs An issue related to the product documentation. label Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AREA: docs An issue related to the product documentation. TYPE: enhancement The accepted proposal for future implementation.
Projects
None yet
Development

No branches or pull requests

3 participants