fonts icon indicating copy to clipboard operation
fonts copied to clipboard

Cannot start nuxt: Failed to get devtools context.

Open larrasu opened this issue 1 year ago • 1 comments

Environment

Version

v0.7.0

Reproduction

https://stackblitz.com/~/github.com/larrasu/frontend-mentor

cd solutions/invoice-app
pnpm dev

Description

I've been experiencing this error in various projects. I'm not sure why I can't reproduce the error on Stackblitz. It's the same repo and branch. The error is still showing up on my end as of now. The only way to get rid of this error is by removing @nuxt/fonts from the nuxt.config.ts. So I figured there is a conflict between@nuxt/fonts and @nuxt/devtools?

Logs

 ERROR  Cannot start nuxt:  Failed to get devtools context.                         12:09:04 AM

  at extendServerRpc (node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@nuxt/devtools-kit/dist/index.mjs:96:11)
  at node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@nuxt/fonts/dist/module.mjs:1137:11
  at node_modules/.pnpm/[email protected]/node_modules/hookable/dist/index.mjs:48:66
  at Object.run (node_modules/.pnpm/[email protected]/node_modules/hookable/dist/index.mjs:41:43)
  at node_modules/.pnpm/[email protected]/node_modules/hookable/dist/index.mjs:48:56
  at async enableModule (/Users/larrasu/.nvm/versions/node/v16.15.1/lib/node_modules/@nuxt/devtools/dist/chunks/module-main.mjs:8466:3)
  at async normalizedModule (/Users/larrasu/.nvm/versions/node/v16.15.1/lib/node_modules/@nuxt/devtools/node_modules/@nuxt/kit/dist/index.mjs:169:17)
  at async installModule (node_modules/.pnpm/@[email protected]/node_modules/@nuxt/kit/dist/index.mjs:2415:95)
  at async initNuxt (node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected]_fl_br3acc34oknouixgtiqiyrhd6y/node_modules/nuxt/dist/index.mjs:4233:7)
  at async NuxtDevServer._load (node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/chunks/dev2.mjs:6879:5)

larrasu avatar May 04 '24 07:05 larrasu

The error you're encountering with @nuxt/fonts and @nuxt/devtools seems to be related to the extendServerRpc function, which facilitates communication between the Nuxt development tools UI and the server. This issue might be similar to a previously reported problem that was resolved in a past version of @nuxt/fonts.

To address this, first, ensure you're using the latest versions of both @nuxt/fonts and @nuxt/devtools. If updating does not resolve the issue, consider reviewing your .nuxtrc file for any incorrect module references that could be causing a conflict.

It's also worth noting that changes in @nuxt/fonts version 0.7.0 do not explicitly mention modifications that would conflict with @nuxt/devtools, suggesting that the issue might be more nuanced, possibly involving specific configurations or steps in your development process.

If the problem persists after these checks, providing more detailed information about your configuration and the steps leading to the error could help identify other potential causes.

Details

Sources


About Dosu This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

dosubot[bot] avatar May 04 '24 08:05 dosubot[bot]

@larrasu my apologies for not checking this out earlier.

I see the reproduction is not accessible, so let's track in https://github.com/nuxt/fonts/issues/106 - let me know if you can provide a reproduction and I'll reopen. 🙏

danielroe avatar Sep 23 '24 12:09 danielroe