Cannot find module 'tape'
See original GitHub issueI am getting this error when I try to start my app. It’s bubbling up from XO since it uses multiple dependencies that rely on resolve.
Error: Cannot find module 'tape'
Require stack:
- /Users/rizowski/git/work/events-service/node_modules/resolve/test/resolver.js
Test cases:
- reverted from node 12 to 10
- switched to xo version 0.26 which was well before this issue
- switched to yarn in case npm is causing the issue
- deleted lock files and node_modules for each test
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
How to Run Tests? Error: Cannot find module 'tape' #3 - GitHub
While following this instruction I ran into a wall: Run node most-recurrent-test.js to run the test suite in full.
Read more >Hello Test: npm install fail, cannot find module 'tape'
It seems like the npm install inside the test folder did not succeed, so now you don't have the tape dependency in your...
Read more >node js module not found for directory of tape tests
I run npm test and i get: > node ./test/*.test.js module.js:328 throw err; ^ Error: Cannot find module 'c:\ ...
Read more >tape - npm
To use them, try node test/index.js | tap-spec or pipe it into one of the modules of your choice! uncaught exceptions. By default,...
Read more >mochajs/mocha - Gitter
All I've been able to find is that Magellan lets you specify a mocha.opts file ... 4.9, 5, 5.1 ] module.js:327 throw err;...
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 FreeTop 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
Top GitHub Comments
Ha I just found it. I had a bad glob pattern in my project. It was
./**/*resolver.js
I must have missed that it was loading from the root of my project so it was looking in node_modules.Crazy how things can be figured out in an hour of talking to someone you don’t know after staring at an issue for 3 days. 😆 Thanks again 👋
Listing out all the things I just tested, it seems to suggest that it’s my environment. And it just so happens to be reproducible across all my devices and environments. 🤔 I just tried to create a test repo that has all the same dependencies installed. I can’t reproduce it in a sample project. Even with the versions I was using. So I’m just going to close this.
@ljharb Thanks for responding quickly to all my pleas and trying to help me debug this. If I figure anything out I’ll post an update.