Skip to content
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

Node 20.11 - Deprecated double slash resolving #1286

Closed
sergenux opened this issue Jan 26, 2024 · 16 comments
Closed

Node 20.11 - Deprecated double slash resolving #1286

sergenux opened this issue Jan 26, 2024 · 16 comments
Labels
bug Something isn't working upstream

Comments

@sergenux
Copy link

Environment

  • Operating System: Windows_NT
  • Node Version: v20.11.0
  • Nuxt Version: 3.9.3
  • CLI Version: 3.10.0
  • Nitro Version: 2.8.1
  • Package Manager: npm@10.3.0
  • Builder: -
  • User Config: modules
  • Runtime Modules: @nuxt/ui@2.12.3
  • Build Modules: -

Version

2.12.3

Reproduction

https://stackblitz.com/

Description

Building Nuxt app in Node 20.11 with NuxtUI 2.12.3 issues many warnings about using of deprecated trailing slash pattern mapping. Some of them:

...
(node:12756) [DEP0155] DeprecationWarning: Use of deprecated trailing slash pattern mapping "./" in the "exports" field module resolution of the package at C:\nuxt-app\node_modules\@iconify\vue\package.json imported from C:\nuxt-app\node_modules. Mapping specifiers ending in "/" is no longer supported.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:12756) [DEP0166] DeprecationWarning: Use of deprecated double slash resolving ".//index.mjs" for module request ".//index.mjs" matched to "./*" in the "exports" field module resolution of the package at C:\nuxt-app\node_modules\@iconify\vue\package.json imported from C:\nuxt-app\node_modules.
(node:12756) [DEP0166] DeprecationWarning: Use of deprecated double slash resolving ".//index.cjs" for module request ".//index.cjs" matched to "./*" in the "exports" field module resolution of the package at C:\nuxt-app\node_modules\@iconify\vue\package.json imported from C:\nuxt-app\node_modules.
(node:12756) [DEP0166] DeprecationWarning: Use of deprecated double slash resolving ".//index.js" for module request ".//index.js" matched to "./*" in the "exports" field module resolution of the package at C:\nuxt-app\node_modules\@iconify\vue\package.json imported from C:\nuxt-app\node_modules.
(node:12756) [DEP0166] DeprecationWarning: Use of deprecated double slash resolving ".//index.json" for module request ".//index.json" matched to "./*" in the "exports" field module resolution of the package at C:\nuxt-app\node_modules\@iconify\vue\package.json imported from C:\nuxt-app\node_modules.
...

screenshot

Additional context

No response

Logs

No response

@sergenux sergenux added the bug Something isn't working label Jan 26, 2024
Copy link
Member

I'm using node 20.11 and haven't encountered this. Do you still have those errors?

@sergenux
Copy link
Author

sergenux commented Feb 9, 2024

I have tried different use cases now. The messages only appear on Windows with the "build" command and default option value "ssr:true". With "generate" and "dev" commands - no warnings. If set "ssr:false" then "build" command also no warning. It is only on Windows, on Ubuntu - no warnings.

@miztizm
Copy link

miztizm commented Feb 12, 2024

I encountered the same error on Windows and also about Iconify Vue

  • node -v21.6.1

@sergenux
Copy link
Author

sergenux commented Feb 22, 2024

We are using npm. With pnpm this problem does not occur, but with npm it does and only on Windows.

@Yakima-Teng
Copy link

Does anyone know how to solve this problem?

@Yakima-Teng
Copy link

Oh, it's a problem to other package instead of nuxt. For me, it's caused by the package "@sxzz/popperjs-es". I am not using @iconify/vue. But they seem to have the same problem.

@dencs08
Copy link

dencs08 commented Mar 7, 2024

Same here, happening to multiple packages.

  • node -v18.7.0
  • windows 10
  • nuxt 3.9.3

@f754699
Copy link

f754699 commented Mar 10, 2024

我也是这样的,哎

@lx-elephantxiang
Copy link

me too;

  • nuxt 3.11.2
  • node 18.20.1

@mubaidr
Copy link

mubaidr commented Apr 29, 2024

Confirmed:

------------------------------
- Operating System: Windows_NT
- Node Version:     v20.12.2
- Nuxt Version:     3.11.2
- CLI Version:      3.11.1
- Nitro Version:    2.9.6
- Package Manager:  pnpm@9.0.6
- Builder:          -
- User Config:      colorMode, css, devtools, experimental, extends, fonts, hooks, i18n, image, imports, modules, nitro, pinia, router, routeRules, runtimeConfig, security, seo, ssr, studio, supabase, telemetry, typescript, ui, features
- Runtime Modules:  @nuxt/content@2.12.1, @nuxt/eslint@0.3.10, @nuxt/fonts@0.6.1, @nuxt/image@1.6.0, @nuxt/ui@2.15.2, @nuxthq/studio@1.0.13, @nuxtjs/seo@2.0.0-rc.10, @nuxtjs/supabase@1.2.1, @pinia/nuxt@0.5.1, @unlok-co/nuxt-stripe@3.0.0, @vueuse/nuxt@10.9.0, nuxt-og-image@2.2.4, nuxt-security@1.4.2, @nuxtjs/i18n@8.3.1
- Build Modules:    -
------------------------------

And build continues for indefinite time, with following logs:

(node:25940) [DEP0166] DeprecationWarning: Use of deprecated double slash resolving ".//index.js" for module request ".//index.js" matched to "./*" in the "exports" field module resolution of the package at E:\my-project\node_modules\@iconify\vue\package.json imported from E:\my-project\node_modules\.pnpm\nitropack@2.9.6_encoding@0.1.13\node_modules.
(node:25940) [DEP0166] DeprecationWarning: Use of deprecated double slash resolving ".//index.json" for module request ".//index.json" matched to "./*" in the "exports" field module resolution of the package at E:\my-project\node_modules\@iconify\vue\package.json imported from E:\my-project\node_modules\.pnpm\nitropack@2.9.6_encoding@0.1.13\node_modules.
(node:25940) [DEP0166] DeprecationWarning: Use of deprecated double slash resolving ".//index.mjs" for module request ".//index.mjs" matched to "./*" in the "exports" field module resolution of the package at E:\my-project\node_modules\@iconify\vue\package.json imported from E:\my-project\node_modules.
(node:25940) [DEP0166] DeprecationWarning: Use of deprecated double slash resolving ".//index.cjs" for module request ".//index.cjs" matched to "./*" in the "exports" field module resolution of the package at E:\my-project\node_modules\@iconify\vue\package.json imported from E:\my-project\node_modules.
(node:25940) [DEP0166] DeprecationWarning: Use of deprecated double slash resolving ".//index.js" for module request ".//index.js" matched to "./*" in the "exports" field module resolution of the package at E:\my-project\node_modules\@iconify\vue\package.json imported from E:\my-project\node_modules.
(node:25940) [DEP0166] DeprecationWarning: Use of deprecated double slash resolving ".//index.json" for module request ".//index.json" matched to "./*" in the "exports" field module resolution of the package at E:\my-project\node_modules\@iconify\vue\package.json imported from E:\my-project\node_modules.

@jimklonowski
Copy link

Same issue, have tried:

  • downgrading nuxt
  • pnpm instead of npm
  • removing shamefully-hoist=true from .npmrc
  • different node versions with nvm

@Ena-Heleneto
Copy link

The issue still persists. Although it doesn't appear on Ubuntu, it affects the build speed.

  "devDependencies": {
    "@alicloud/dingtalk": "^2.1.49",
    "@antfu/eslint-config": "^2.27.3",
    "@element-plus/nuxt": "^1.0.10",
    "@headlessui/vue": "^1.7.23",
    "@heroicons/vue": "^2.1.5",
    "@iconify/json": "^2.2.250",
    "@nuxt/devtools": "^1.4.2",
    "@nuxt/eslint": "^0.5.7",
    "@nuxtjs/color-mode": "^3.5.1",
    "@pinia-plugin-persistedstate/nuxt": "^1.2.1",
    "@pinia/nuxt": "^0.5.4",
    "@types/animejs": "^3.1.12",
    "@types/big.js": "^6.2.2",
    "@unocss/eslint-config": "^0.62.4",
    "@unocss/nuxt": "^0.62.4",
    "@vite-pwa/nuxt": "^0.10.5",
    "@vueuse/nuxt": "^11.1.0",
    "animejs": "^3.2.2",
    "big.js": "^6.2.2",
    "consola": "^3.2.3",
    "dingtalk-stream": "^2.1.4",
    "element-plus": "^2.8.3",
    "esdk-obs-nodejs": "^3.24.3",
    "eslint": "^9.10.0",
    "eslint-plugin-format": "^0.1.2",
    "html2canvas": "^1.4.1",
    "konva": "^9.3.15",
    "lodash": "^4.17.21",
    "moment": "^2.30.1",
    "mongodb": "^6.9.0",
    "nuxt": "^3.13.2",
    "nuxt-headlessui": "^1.2.0",
    "nuxt-lodash": "^2.5.3",
    "nuxt-mongoose": "^1.0.6",
    "pinia": "^2.2.2",
    "sass-embedded": "^1.79.2",
    "typescript": "^5.6.2",
    "vue-konva": "^3.1.2",
    "vue-tsc": "^2.1.6"
  },
  "resolutions": {
    "@typescript-eslint/utils": "^8.2.0"
  }

@donPuerto
Copy link

donPuerto commented Oct 9, 2024

here also, any temporary solution? I can't publish into production using Vercel with same error

it also related to @iconify/utils @iconify/vue packages

(node:22644) [DEP0155] DeprecationWarning: Use of deprecated trailing slash pattern mapping "./" in the "exports" field module resolution of the package at D:\Code\Nuxt\v3\projects\nuxt3-content2-tailwind-portfolio-v4\node_modules\@iconify\utils\package.json imported from D:\Code\Nuxt\v3\projects\nuxt3-content2-tailwind-portfolio-v4\node_modules. Mapping specifiers ending in "/" is no longer supported.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:22644) [DEP0155] DeprecationWarning: Use of deprecated trailing slash pattern mapping "./" in the "exports" field module resolution of the package at D:\Code\Nuxt\v3\projects\nuxt3-content2-tailwind-portfolio-v4\node_modules\@iconify\vue\package.json imported from D:\Code\Nuxt\v3\projects\nuxt3-content2-tailwind-portfolio-v4\node_modules. Mapping specifiers ending in "/" is no longer supported.

Copy link
Member

Do you reproduce this with a clean app with only the @nuxt/icon module?

@tobiasdiez
Copy link

This should be fixed with unjs/mlly#278 (it might take a bit until it bubbles up the dependency tree)

Copy link
Member

benjamincanac commented Nov 9, 2024

Can anyone confirm that this is now fixed? Feel free to reopen if it is not.

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