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.

ErrorCaptureStackTrace Cannot find module

See original GitHub issue

I’m getting the following error when starting my node app… haven’t seen this before and no idea what’s causing it:

node:internal/errors:465
	ErrorCaptureStackTrace(err);
	^

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/root/workspace/meteogram/node_modules/luxon/src/impl/formatter' imported from /root/workspace/meteogram/node_modules/luxon/src/info.js
	at new NodeError (node:internal/errors:372:5)
	at finalizeResolution (node:internal/modules/esm/resolve:437:11)
	at moduleResolve (node:internal/modules/esm/resolve:1009:10)
	at defaultResolve (node:internal/modules/esm/resolve:1218:11)
	at ESMLoader.resolve (node:internal/modules/esm/loader:580:30)
	at ESMLoader.getModuleJob (node:internal/modules/esm/loader:294:18)
	at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:80:40)
	at link (node:internal/modules/esm/module_job:78:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}

Am using luxon 3.0.2, importing via ESM:

import { IANAZone } from 'luxon'; // https://www.npmjs.com/package/luxon

Works without problem with luxon 2.5.0.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:10
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
zdmcommented, Aug 29, 2022

Could you please make patch release?

4reactions
icambroncommented, Aug 29, 2022

Yeah, this is fixed in 3.0.3, and I marked 3.0.2 as deprecated

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error [ERR_MODULE_NOT_FOUND]: Cannot find module
This answer was the one that helped me! I was using import and the file was . js - Adding --es-module-specifier-resolution=node saved the...
Read more >
Error [ERR_MODULE_NOT_FOUND]: Cannot find module in JS
The "Error [ERR_MODULE_NOT_FOUND]: Cannot find module" occurs when you set the type attribute to module in your package.json file, but omit the file ......
Read more >
ERR_MODULE_NOT_FOUND for project-level module #3163
I've never had an error so confusing. What am I missing here? I'm sure this is not a bug, seeing how mature Node.js...
Read more >
cannot find module [Node npm Error Solved] - freeCodeCamp
In my case, I got it like this "Module not found: Error: Can't resolve 'react-icons/fa' in 'C:\Users\user\Desktop\Projects\Address Locator\ ...
Read more >
[Solution] Error: Cannot Find Module "nodemailer" - Courier
This error occurs when you have not installed the nodemailer library in your Node.js application. Solution - Here's How To Resolve It. First,...
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