harlan-zw / nuxt-seo

The complete SEO solution for Nuxt.
https://nuxtseo.com
MIT License
1.1k stars 70 forks source link

Duplicated Imports of getPathRobotConfig Causing Warnings #279

Closed vasilistotskas closed 1 month ago

vasilistotskas commented 4 months ago

Describe the bug

While building my Nuxt application, I'm encountering warnings related to duplicated imports of getPathRobotConfig. Specifically, it appears that the import from #internal/nuxt-robots is being ignored in favor of the one from nuxt-simple-sitemap. Here are the relevant details from the build logs:

✔ Server built in 26994ms                                                                                                                                                                                              7:37:26 PM
Duplicated imports "getPathRobotConfig", the one from "#internal/nuxt-robots" has been ignored and "C:/Dev/grooveshop-dev/grooveshop-storefront-ui-node-nuxt/node_modules/.pnpm/nuxt-simple-sitemap@4.4.1_@nuxt+devtools@1.3.9_rollup@4.19.0_vite@5.3.5_@types+node@20.14.12__v3gujcuehdgj63yure5gc66bxu/node_modules/nuxt-simple-sitemap/dist/runtime/nitro/composables/getPathRobotConfigPolyfill" is used
✔ Generated public .output/public                                                                                                                                                                                nitro 7:37:28 PM

PWA v0.20.1
Building service-worker/sw.ts service worker ("es" format)...
vite v5.3.5 building for production...
✓ 65 modules transformed.
../.output/public/sw.mjs  16.30 kB │ gzip: 5.49 kB │ map: 142.10 kB
✓ built in 222ms

PWA v0.20.1
mode      injectManifest
format:   es
precache  211 entries (8121.75 KiB)
files generated
  ../.output/public/sw.js
  ../.output/public/sw.js.map
Duplicated imports "getPathRobotConfig", the one from "#internal/nuxt-robots" has been ignored and "C:/Dev/grooveshop-dev/grooveshop-storefront-ui-node-nuxt/node_modules/.pnpm/nuxt-simple-sitemap@4.4.1_@nuxt+devtools@1.3.9_rollup@4.19.0_vite@5.3.5_@types+node@20.14.12__v3gujcuehdgj63yure5gc66bxu/node_modules/nuxt-simple-sitemap/dist/runtime/nitro/composables/getPathRobotConfigPolyfill" is used
ℹ Building Nuxt Nitro server (preset: node-server)                                                                                                                                                               nitro 7:37:30 PM
Duplicated imports "getPathRobotConfig", the one from "#internal/nuxt-robots" has been ignored and "C:/Dev/grooveshop-dev/grooveshop-storefront-ui-node-nuxt/node_modules/.pnpm/nuxt-simple-sitemap@4.4.1_@nuxt+devtools@1.3.9_rollup@4.19.0_vite@5.3.5_@types+node@20.14.12__v3gujcuehdgj63yure5gc66bxu/node_modules/nuxt-simple-sitemap/dist/runtime/nitro/composables/getPathRobotConfigPolyfill" is used

Reproduction

No response

System / Nuxt Info

System:
 OS: Windows 11 10.0.22635
 CPU: (6) x64 Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
 Memory: 10.33 GB / 31.94 GB
Binaries:
 Node: 22.5.1 - C:\Program Files\nodejs\node.EXE
 npm: 10.8.2 - C:\Program Files\nodejs\npm.CMD
 pnpm: 9.6.0 - C:\Program Files\nodejs\pnpm.CMD
 bun: 1.1.8 - ~\.bun\bin\bun.EXE
Browsers:
 Edge: Chromium (127.0.2651.8)
 Internet Explorer: 11.0.22621.3566

- Operating System: Windows_NT
- Node Version:     v22.5.1
- Nuxt Version:     3.12.4
- CLI Version:      3.12.0
- Nitro Version:    2.9.7
- Package Manager:  pnpm@9.6.0
- Builder:          -
- User Config:      ssr, debug, sourcemap, telemetry, future, app, site, modules, routeRules, build, imports, experimental, devtools, typescript, tailwindcss, i18n, css, runtimeConfig, cookieControl, pinia, vite, nitro, eslint, image, pwa, schemaOrg, sitemap, scripts, linkChecker, robots, htmlValidator, veeValidate, ogImage, colorMode, turnstile
- Runtime Modules:  @nuxt/image@1.7.0, @nuxt/ui@2.18.2, @nuxt/eslint@0.3.13, @nuxt/test-utils/module@3.13.1, @nuxt/scripts@0.6.4, @nuxtjs/i18n@8.3.1, @nuxtjs/tailwindcss@6.12.1, @nuxtjs/html-validator@1.8.2, @nuxtjs/device@3.1.1
, @nuxtjs/turnstile@0.9.3, @nuxtseo/module@2.0.0-beta.55, @pinia/nuxt@0.5.1, @vueuse/nuxt@10.11.0, @vite-pwa/nuxt@0.9.1, @vee-validate/nuxt@4.13.2, unplugin-icons/nuxt, nuxt-auth-utils@0.2.1, nuxt-time@0.1.3, nuxt-pages-plus@0.3.0-beta.0
harlan-zw commented 4 months ago

Hi, the @nuxtseo/module is deprecated, can you please upgrade to @nuxtjs/seo. There's a guide here: https://nuxtseo.com/nuxt-seo/migration-guide/beta-to-rc

vasilistotskas commented 4 months ago

Oh yes i noticed like 2 mins ago, thanks!

oom- commented 1 month ago

@harlan-zw Hello, I have the same issue and i'm up to date:

 "dependencies": {
        "@nuxtjs/seo": "^2.0.0-rc.23",
        ...
    },
    "devDependencies": {
        "nuxt-site-config": "^2.2.18",
        "nuxt-site-config-kit": "^2.2.18",
        ...
    }
[12:46:25]  WARN  Duplicated imports "getPathRobotConfig", the one from "#internal/nuxt-robots" has been ignored and "[...]/node_modules/@nuxtjs/sitemap/dist/runtime/nitro/composables/getPathRobotConfigPolyfill" is used

[12:46:25]  WARN  Duplicated imports "getPathRobotConfig", the one from "#internal/nuxt-robots" has been ignored and "[...]/node_modules/@nuxtjs/sitemap/dist/runtime/nitro/composables/getPathRobotConfigPolyfill" is used

[12:46:26]  WARN  Duplicated imports "getPathRobotConfig", the one from "#internal/nuxt-robots" has been ignored and "[...]/node_modules/@nuxtjs/sitemap/dist/runtime/nitro/composables/getPathRobotConfigPolyfill" is used