Errors running tests after git clone and npm install from master
See original GitHub issueThe 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:
- Created 5 years ago
- Comments:12 (12 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I just tried a fresh build and it looks like lerna builds the website package before the
react-router-dompackage, which causes a resolve error. The CI build has no issues with this because it skips the website. The website package has a dependency onreact-router-dom, so lerna should buildreact-router-domfirst, but obviously that isn’t the case.It should. I blew away my local install and it works OK now. It was the lerna weirdness getting in the way before.