question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Errors running tests after git clone and npm install from master

See original GitHub issue

The tests are failing after cloning and installing the master branch of react-router.

Steps to reproduce

git clone https://github.com/ReactTraining/react-router.git npm install npm run build npm test

Expected Behavior

The tests should pass.

Actual Behavior

The tests are failing, with the first error being:

FAIL modules/__tests__/NavLink-test.js
  ● NavLink › When a <NavLink> is not active › renders child components that use withRouter

    expect(received).toBe(expected) // Object.is equality
    
    Expected value to be:
      true
    Received:
      false

      213 |       );
      214 | 
    > 215 |       expect(ref instanceof WrappedComponent).toBe(true);
      216 |     });
      217 |   });
      218 | 
      
      at Object.<anonymous> (modules/__tests__/NavLink-test.js:215:47)

os: MacOS 10.13.4 node: 10.1.0 npm: 5.6.0

In general it seems that there are lots of issues with how dependencies are being resolved across the mono repo during test execution.

The above error is only the first in several errors that I’m seeing when trying to run the tests… 😕

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
pshrmncommented, May 25, 2018

I just tried a fresh build and it looks like lerna builds the website package before the react-router-dom package, which causes a resolve error. The CI build has no issues with this because it skips the website. The website package has a dependency on react-router-dom, so lerna should build react-router-dom first, but obviously that isn’t the case.

0reactions
timdorrcommented, Jun 6, 2018

It should. I blew away my local install and it works OK now. It was the lerna weirdness getting in the way before.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Errors running tests after git clone and npm install from master
The tests are failing after cloning and installing the master branch of react-router. Steps to reproduce git clone ...
Read more >
Error When I try to use NPM install package.json file
I see that your project is cloned in a OneDrive folder, and that may cause the issue as npm downloads lots of files...
Read more >
Common errors | npm Docs
You are trying to install on a drive that either has no space, or has no permission to write. Free some disk space...
Read more >
What are Github Actions and How Can You Automate Tests ...
Once you have that cloned locally and have installed the dependencies, you should be able to run the tests and see them pass!...
Read more >
Git Hooks | Atlassian Git Tutorial
Git Hooks are scripts that run automatically every time a particular event ... Use git diff-index to check for whitespace errors echo "pre-commit:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found