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.

Unable to use the package

See original GitHub issue

I am getting an error

ERROR  Cannot start nuxt:  The requested module '@graphql-codegen/plugin-helpers' does not provide an export named 'DetailedError'                                                         12:03:52

  import { DetailedError, createNoopProfiler } from '@graphql-codegen/plugin-helpers';
  ^^^^^^^^^^^^^
  SyntaxError: The requested module '@graphql-codegen/plugin-helpers' does not provide an export named 'DetailedError'
  at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
  at async ModuleJob.run (node:internal/modules/esm/module_job:181:5)
  at async Promise.all (index 0)
  at async ESMLoader.import (node:internal/modules/esm/loader:281:24)
  at async normalizeModule (node_modules/@nuxt/kit/dist/index.mjs:476:26)
  at async installModule (node_modules/@nuxt/kit/dist/index.mjs:455:41)
  at async initNuxt (node_modules/nuxt/dist/index.mjs:1606:7)
  at async load (node_modules/nuxi/dist/chunks/dev.mjs:6778:9)
  at async Object.invoke (node_modules/nuxi/dist/chunks/dev.mjs:6828:5)
  at async _main (node_modules/nuxi/dist/cli.mjs:50:20)

I guess it might be because of the recent update to the graphql-code-generator more specifically because of this PR where they have removed the DetailedError

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:17 (7 by maintainers)

github_iconTop GitHub Comments

6reactions
Diizzayycommented, Nov 11, 2022

@ShreyAmbesh @boboldehampsink Temporary fix:

Context

This error occurs when the .nuxt directory wasn’t generated prior to running nuxi dev or nuxi prepare, the error is due to to ts-node attempting to load the .nuxt/tsconfig.json file which is extended by the project level tsconfig.json file.

1. Modify tsconfig.json - Recommended approach

Temporarily comment out the line below until the .nuxt directory has been generated.

{
//    "extends": "./.nuxt/tsconfig.json"
}

Be sure to remove the comment after the .nuxt directory has been generated.

2. OR Pin Dependencies

Add the following to your package.json file to pin the pertinent dependencies.

For NPM

  "overrides": {
    "@graphql-codegen/cli": "2.13.4",
    "@graphql-codegen/core": "2.6.2",
    "@graphql-codegen/plugin-helpers": "2.7.1"
  }

For Yarn / Pnpm

  "resolutions": {
    "@graphql-codegen/cli": "2.13.4",
    "@graphql-codegen/core": "2.6.2",
    "@graphql-codegen/plugin-helpers": "2.7.1"
  }
3reactions
Diizzayycommented, Nov 16, 2022

maddening

@stlbucket Indeed, this is quite an annoying bug caused by important upstream dependencies that we haven’t been able to get around. As a temporary workaround I might resort to publishing a patched version of the dep to be used solely by this nuxt module that averts this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to use package assets cache due to I/O error on build
Unable to use package assets cache due to I/O error. This can occur when the same project is built more than once in...
Read more >
Unable to use nuget packages - Stack Overflow
1) clean all nuget caches first or just delete all files under C:\Users\xxx\. · 2) to remove that warning, please add this xml...
Read more >
Unable to use package manager due to "exclusive lock" error
Unable to get exclusive lock This usually means that another package management application(like apt-get or aptitude) is already running. Please close that ...
Read more >
Android Package Installer Not Working - YouTube
Your browser can't play this video. ... These should all help the package installer to operate normally. I hope this video helped solve...
Read more >
Troubleshooting NuGet Package Restore in Visual Studio
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.
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