nuxt / nuxt/icon

[BUG] Deprecation Warning on Nuxt.js build due to package.json export

Open
#140 56 comments 54 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted upstream
Dominant language
TypeScript
Stars
1.2k
Forks
96
Avg merge
8h 12m
Merged PRs (30d)
2

Description

When building my Nuxt.js project which uses this package, I get a bunch of deprecation warnings, following this format:

(node:2848) [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 [PROJECT PATH]\node_modules\@iconify\vue\package.json imported from [PROJECT PATH]\node_modules\nitropack\node_modules\_index.js.
(node:2848) [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 [PROJECT PATH]\node_modules\@iconify\vue\package.json imported from [PROJECT PATH]\node_modules\nitropack\node_modules.
(node:2848) [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 [PROJECT PATH]\node_modules\@iconify\vue\package.json imported from [PROJECT PATH]\node_modules\nitropack\node_modules.
(node:2848) [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 [PROJECT PATH]\node_modules\@iconify\vue\package.json imported from [PROJECT PATH]\node_modules\nitropack\node_modules.
(node:2848) [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 [PROJECT PATH]\node_modules\@iconify\vue\package.json imported from [PROJECT PATH]\node_modules\nitropack\node_modules.
(node:2848) [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 [PROJECT PATH]\node_modules\@iconify\vue\package.json imported from [PROJECT PATH]\node_modules.
(node:2848) [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 [PROJECT PATH]\node_modules\@iconify\vue\package.json imported from [PROJECT PATH]\node_modules.
(node:2848) [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 [PROJECT PATH]\node_modules\@iconify\vue\package.json imported from [PROJECT PATH]\node_modules.
(node:2848) [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 [PROJECT PATH]\node_modules\@iconify\vue\package.json imported from [PROJECT PATH]\node_modules.
(node:2848) [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 [PROJECT PATH]\node_modules\@iconify\vue\package.json imported from [PROJECT PATH]\node_modules\nuxt\node_modules.

This looks to be referring to this line in the Iconify package.json:

https://github.com/iconify/iconify/blob/a8e3b45ecd56e194fd8ef2c3b4eeb6f8c4e68bb1/components/vue/package.json#L27

Have I got a configuration issue, or is this a bug in this library or the Iconify one?
Haven't found any previous reports of this, so this could just be an issue with my project.

I'm on Node v18.17.0, Nuxt v3.8.0 and NuxtIcon v0.6.1
Thanks :)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing a Nuxt build with Node v18.17.0, Nuxt v3.8.0, and NuxtIcon v0.6.1, then inspect the linked components/vue/package.json line 27 and its exports entry. Determine whether the package or this library causes the DEP0166 warnings, and consider the issue done when the responsible package no longer emits the deprecation warnings during the build.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, nuxt, typescript
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.