8000 Adding NuxtHub module causes errors in other dependencies during build · Issue #513 · nuxt-hub/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Adding NuxtHub module causes errors in other dependencies during build #513

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
yakovenkodenis opened this issue Mar 22, 2025 · 2 comments
Labels
bug Something isn't working upstream

Comments

@yakovenkodenis
Copy link
yakovenkodenis commented Mar 22, 2025

Describe the bug
Adding the @nuxthub/core module to the project breaks the nuxt build command, but the errors come from a different module.

This might have something to do with the cloudflare-pages preset for nitro 🤔

My Nuxt 3 project with deployment to NuxtHub worked fine until I tried to add the @reown/appkit packages for crypto wallets functionality.

I'm not quite sure if this is the right place to submit an issue (could be the @reown/appkit problem), but removing the @nuxthub/core module does fix the problem and allows the build command to run successfully.

The error itself is quite cryptic:

Cannot resolve "pino-pretty" from "/my-app/node_modules/pino/lib/tools.js" and externals are not allowed!

Installing pino and pino-pretty does not resolve the issue.

I have also tried adding this configuration in my nuxt.config.ts, but this led me to another "externals" error:

  nitro: {
    rollupConfig: {
      external: ['pino', 'pino-pretty'],
    },
  },

  experimental: {
    clientNodeCompat: true,
  },

Cannot resolve "node:string_decoder/" from "/app/node_modules/keccak/node_modules/readable-stream/lib/_stream_readable.js" and externals are not allowed!

Steps to reproduce
A minimal reproducible example on StackBlitz: https://stackblitz.com/edit/nuxt-starter-ksablssm?file=nuxt.config.ts

Running npm run build causes the described issue. Removing the @nuxthub/core makes the npm run build command run successfully again.

The setup of both packages is minimal and based on examples copied from the documentation.

Expected behavior
npm run build/nuxt build command executes successfully.

@yakovenkodenis yakovenkodenis added the bug Something isn't working label Mar 22, 2025
@OTTIN-T
Copy link
OTTIN-T commented Mar 31, 2025

Hello, I would like to add this reproduction because the problem seems to be linked:
https://stackblitz.com/edit/nuxt-starter-abq7fa4h?file=package.json
(I'm sorry the stackblitzversion doesn't show error details, unlike my pnpm project)

In my case, it's a conflict with playwright/nuxthub/nuxt-seo

If I build in the state I have this error:

[nitro 4:08:41 PM]  ERROR  Error: Cannot resolve 
"D:/Dev/project/node_modules/.pnpm/nuxt-og-image@5.0.4_@unhead_a708d75e3ee8de951b0e218395157c4e/node_modules/nuxt-og-image/dist/runtime/mock/proxy-cjs/index.js" 
from 
"D:\\Dev\\project\\node_modules\\.pnpm\\playwright-core@1.51.0\\node_modules\\playwright-core\\lib\\server\\electron\\electron.js" 
and externals are not allowed!

    at Object.resolveId (/D:/Dev/project/node_modules/.pnpm/nitropack@2.11.8/node_modules/nitropack/dist/rollup/index.mjs:2009:17)
    at async PluginDriver.hookFirstAndGetPlugin (/D:/Dev/project/node_modules/.pnpm/rollup@4.38.0/node_modules/rollup/dist/es/shared/node-entry.js:22003:28)
    at async resolveId (/D:/Dev/project/node_modules/.pnpm/rollup@4.38.0/node_modules/rollup/dist/es/shared/node-entry.js:20478:26)
    at async ModuleLoader.resolveId (/D:/Dev/project/node_modules/.pnpm/rollup@4.38.0/node_modules/rollup/dist/es/shared/node-entry.js:20914:15)
    at async PluginDriver.hookFirstAndGetPlugin (/D:/Dev/project/node_modules/.pnpm/rollup@4.38.0/node_modules/rollup/dist/es/shared/node-entry.js:22003:28)
    at async resolveId (/D:/Dev/project/node_modules/.pnpm/rollup@4.38.0/node_modules/rollup/dist/es/shared/node-entry.js:20478:26)
    at async ModuleLoader.resolveId (/D:/Dev/project/node_modules/.pnpm/rollup@4.38.0/node_modules/rollup/dist/es/shared/node-entry.js:20914:15)
    at async /D:/Dev/project/node_modules/.pnpm/@rollup+plugin-commonjs@28.0.3_rollup@4.38.0/node_modules/@rollup/plugin-commonjs/dist/es/index.js:797:16
    at async Promise.all (index 21)
    at async /D:/Dev/project/node_modules/.pnpm/@rollup+plugin-commonjs@28.0.3_rollup@4.38.0/node_modules/@rollup/plugin-commonjs/dist/es/index.js:789:32 

For some reason, if I remove playwright from my dependencies, the build works.
And conversely, if I delete NuxtHub, the build also works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream
Projects
None yet
Development

No branches or pull requests

4 participants
@atinux @yakovenkodenis @OTTIN-T and others
0