ui icon indicating copy to clipboard operation
ui copied to clipboard

Node 20.11 - Deprecated double slash resolving

Open sergenux opened this issue 1 year ago • 10 comments

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: [email protected]
  • Builder: -
  • User Config: modules
  • Runtime Modules: @nuxt/[email protected]
  • 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 avatar Jan 26 '24 08:01 sergenux

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

benjamincanac avatar Feb 08 '24 17:02 benjamincanac

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.

sergenux avatar Feb 09 '24 08:02 sergenux

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

  • node -v21.6.1

miztizm avatar Feb 12 '24 21:02 miztizm

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

sergenux avatar Feb 22 '24 06:02 sergenux

Does anyone know how to solve this problem?

Yakima-Teng avatar Mar 05 '24 03:03 Yakima-Teng

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.

Yakima-Teng avatar Mar 05 '24 04:03 Yakima-Teng

Same here, happening to multiple packages.

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

dencs08 avatar Mar 07 '24 23:03 dencs08

我也是这样的,哎

f754699 avatar Mar 10 '24 12:03 f754699

me too;

  • nuxt 3.11.2
  • node 18.20.1

lx-elephantxiang avatar Apr 23 '24 06:04 lx-elephantxiang

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:  [email protected]
- 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/[email protected], @nuxt/[email protected], @nuxt/[email protected], @nuxt/[email protected], @nuxt/[email protected], @nuxthq/[email protected], @nuxtjs/[email protected], @nuxtjs/[email protected], @pinia/[email protected], @unlok-co/[email protected], @vueuse/[email protected], [email protected], [email protected], @nuxtjs/[email protected]
- 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\[email protected][email protected]\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\[email protected][email protected]\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.

mubaidr avatar Apr 29 '24 07:04 mubaidr

Same issue, have tried:

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

jimklonowski avatar May 22 '24 12:05 jimklonowski

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"
  }

Ena-Heleneto avatar Oct 08 '24 08:10 Ena-Heleneto

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.

donPuerto avatar Oct 09 '24 07:10 donPuerto

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

benjamincanac avatar Oct 09 '24 08:10 benjamincanac

This should be fixed with https://github.com/unjs/mlly/pull/278 (it might take a bit until it bubbles up the dependency tree)

tobiasdiez avatar Oct 09 '24 09:10 tobiasdiez