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 load v16.0.1

See original GitHub issue

In a TS project using graphql-upload v16.0.1, when I npm run dev:

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in node_modules/graphql-upload/package.json

Setup:

    "@types/graphql-upload": "^8.0.11",
    "graphql-upload": "^16.0.1",

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

11reactions
jaydensericcommented, Aug 29, 2022

Me changing the graphql-upload API to named imports from a main index module or keeping it the current way with default deep imports for optimal JavaScript module design won’t make a difference for Nest.js users; their issue (apparently, I don’t use Nest.js) is that they don’t support importing from standard ESM modules at all, which graphql-upload is now. I’m not going to regress back to CJS format, graphql-upload will always be standard ESM moving forwards.

Is there a way that you could publish it, so that us nest.js developers can benefit from your great package?

No, Nest.js should fix Nest.js bugs or else users will have to abandon it as it will no longer be fit for purpose as many important npm packages are being published in standard ESM format.

Regarding all those articles/tutorials, they are years old and it’s not reasonable to expect their code examples to still work the same. I’ve published new versions of graphql-upload since they were written. The source of truth is the graphql-upload readme and what is actually published to npm.

7reactions
Javadebicommented, Aug 16, 2022

I don’t know why you closed this issue but I got the same error. I removed the type and node module. installed again. now I get this error: Cannot find module 'graphql-upload' or its corresponding type declarations.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgrade from v15.1.1 to v16.0.0.1 config not loading with fatal
Upgrading BIGIP from v15.1.1 to v16.0.0.1 fails to load config with the following error message fatal: (Can't load keyword definition ...
Read more >
Error: Cannot find module 'vue-loader-v16/package.json'
Try to just install the pacakge to devDependencies: npm i --save-dev vue-loader-v16. It helped me out. With babble.config.js do you then ...
Read more >
CascadePackage package did not load correctly
0.1 an error message “The 'CascadePackage' package did not load correctly” is shown. This happens both when starting an empty VS and when...
Read more >
firefox won't load many sites, including mozilla after upgrade to v16 ...
problem continues after downgrade to v4.0.1. message is: "The page you are trying to view cannot be shown because it uses an invalid...
Read more >
Visual Studio 2019 version 16.11 Release Notes
Visual Studio 2019 v16.7 and v16.8 Preview 1 Release Today! ... 'Could not load file or assembly' after updating to Visual Studio 16.10 ......
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