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.

Cannot find module '../../package' from 'node.js'

See original GitHub issue
  • Issue

With the latest version 21.2.0 I get the error Cannot find module '../../package' from 'node.js' in all of my tests. I already changed my jest config from ".(ts|tsx)": "<rootDir>/node_modules/ts-jest/preprocessor.js" to "^.+\\.tsx?$": "ts-jest" but the error remains.

  • Expected behavior

Tests should run as before.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:13 (9 by maintainers)

github_iconTop GitHub Comments

25reactions
bradleyayerscommented, Dec 2, 2017

I get this error if I don’t have "json" as a value in moduleFileExtensions.

1reaction
kulshekharcommented, Nov 8, 2017

21.2.1 has been published

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I resolve "Cannot find module" error using Node.js?
This error can be encountered if you are require ing a module that has a missing or incorrect main ...
Read more >
How to resolve "Cannot find module" error in Node - Sabe.io
The issue is that Node is unable to find the module that you are trying to import into your Node application. The most...
Read more >
Cannot find module 'X' error in Node.js | bobbyhadz
To solve the "Cannot find module" error in Node.js, make sure to install the package from the error message if it's a third-party...
Read more >
Error: Cannot find module in JavaScript [SOLVED]
Error: Cannot find module 'package-name' is a popular module error message that you might face when working with Node and its packages which...
Read more >
How to solve "Error: Cannot find module '*.js'" with Node.js
Make sure you are in the correct directory. Make sure you are trying to run the correct file name. File and directory names...
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