No valid exports for `listr2/node_modules/uuid`
See original GitHub issueRunning lint-staged (using listr2 2.0.1 https://github.com/okonet/lint-staged/blob/master/package.json#L41) fails when running with the following stack:
husky > pre-commit (node v13.3.0)
internal/modules/cjs/loader.js:621
throw e;
^
Error: No valid exports main found for 'project/node_modules/listr2/node_modules/uuid'
at resolveExportsTarget (internal/modules/cjs/loader.js:618:9)
at applyExports (internal/modules/cjs/loader.js:499:14)
at resolveExports (internal/modules/cjs/loader.js:548:12)
at Function.Module._findPath (internal/modules/cjs/loader.js:650:22)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:948:27)
at Function.Module._load (internal/modules/cjs/loader.js:854:27)
at Module.require (internal/modules/cjs/loader.js:1023:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (project/node_modules/listr2/dist/lib/task.js:9:16)
at Module._compile (internal/modules/cjs/loader.js:1128:30) {
code: 'MODULE_NOT_FOUND'
}
husky > pre-commit hook failed (add --no-verify to bypass)
I’ve tried removing node_modules
and package-lock and re-installing but no luck 😔
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
No valid exports main found for node_modules\uuid #5381
Hi, I just updated my project using npm -update @loopback/cli and lb4 update. No errors on build but when I start I get...
Read more >How to fix “Error: No valid exports main found for ... - Dev Genius
Recently when I was developing for a React application that I hadn't pulled from the master branch in a while, I came across...
Read more >How do I fix my "No valid exports main found" compile error?
In my chrome and terminal, it says like this way. Failed to compile ./src/index.css (./node_modules/css-loader/dist/cjs.js??ref-- ...
Read more >HOW TO SOLVE THE NO VALID EXPORTS ERROR IN ...
Recently while running the sequelize-cli init command, I ran into an error. The error message was something like export not found.
Read more >How to fix “Error: No valid exports main found ... - Godwill Barasa
How to fix “Error: No valid exports main found for '/node_modules/packname by Godwill Barasa. On 12th May, as I was trying to “npm...
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 can replace that because uuid is a bit overkill. Just had to create some random task ids even math.random should have worked but when initially I integrated it for testing, it stayed like it from that point on.
@cenk1cenk2 The package nanoid is a pretty popular option, especially if the id doesn’t have to be an official UUID: https://github.com/ai/nanoid