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.

Cannot find module 'tape'

See original GitHub issue

I 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:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

rizowskicommented, Apr 16, 2020

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 👋

rizowskicommented, Apr 16, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

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 Post

No results found

github_iconTop Related Hashnode Post

No results found