DEP0155 Deprecation Warning with @iconify/utils
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 96
- Avg merge
- 8h 12m
- Merged PRs (30d)
- 2
Description
DEP0155 Deprecation Warning with @iconify/utils in @nuxt/icon
Description
When building my Nuxt.js project, I encounter a DEP0155 deprecation warning related to @iconify/utils. The warning indicates the use of a deprecated trailing slash pattern mapping (./) in the exports field of the package.json file for @iconify/utils. This issue persists even after updating to the latest versions of @nuxt/icon and @iconify-json/tabler.
Steps to Reproduce
Create a Nuxt.js project with the following dependencies in package.json:"dependencies": {
"@nuxt/icon": "^1.13.0",
"@iconify-json/tabler": "^1.2.18",
"nuxt": "^3.17.4",
"vue": "^3.5.16",
"vue-router": "^4.5.1"
}
Configure @nuxt/icon in nuxt.config.ts:import tailwindcss from "@tailwindcss/vite";
export default defineNuxtConfig({
compatibilityDate: '2025-05-15',
devtools: { enabled: true },
css: ['~/assets/css/main.css'],
modules: ['@nuxt/icon'],
icon: {
mode: 'css',
cssLayer: 'base',
serverBundle: {
collections: ['tabler']
}
},
vite: {
plugins: [tailwindcss()],
build: {
sourcemap: false
},
css: {
devSourcemap: true
}
}
});
Run the build command:npm run build
Observe the following warning in the build output:(node:26620) [DEP0155] DeprecationWarning: Use of deprecated trailing slash pattern mapping "./" in the "exports" field module resolution of the package at D:\Projects\www\node_modules@iconify\utils\package.json imported from D:\Projects\www\node_modules@nuxt\icon\dist\runtime\server\api.js.
Expected Behavior
The build process should complete without any DEP0155 deprecation warnings related to @iconify/utils.
Actual Behavior
The build process completes successfully, but the DEP0155 deprecation warning is displayed, indicating an issue with the exports field in the @iconify/utils package.
Environment
Node.js Version: v22.16.0
Nuxt Version: 3.17.4
@nuxt/icon Version: 1.13.0
@iconify-json/tabler Version: 1.2.18
Operating System: Windows (PowerShell)
Other Relevant Dependencies:
vue: ^3.5.16
vue-router: ^4.5.1
@tailwindcss/vite: ^4.1.8
tailwindcss: ^4.1.8
Additional Context
The warning does not seem to affect the functionality of the application, as icons (e.g., tabler:star) render correctly.
I have tried updating @nuxt/icon and @iconify-json/tabler to the latest versions using npm install @nuxt/icon@latest @iconify-json/tabler@latest, but the warning persists.
A similar DEP0155 warning is also observed for @vue/shared, but this issue focuses on @iconify/utils.
I attempted to suppress the warning using NODE_OPTIONS=--no-deprecation with cross-env, which works but only masks the issue.
Suggested Fix
It appears that the @iconify/utils package uses a deprecated exports field format in its package.json. Updating the exports field to avoid the trailing slash pattern (./) could resolve this issue. Alternatively, if this is an upstream issue in @iconify/utils, please advise on any workarounds or planned updates.
Related Issues
Similar issue reported for @iconify/vue: nuxt/icon#140
Build size concerns with @nuxt/icon: nuxt/icon#188
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the warning with the listed dependencies using npm run build. Inspect @iconify/utils/package.json and @nuxt/icon/dist/runtime/server/api.js, then determine whether the deprecated exports mapping is owned here or upstream. Done means the build no longer reports the DEP0155 warning without suppressing deprecations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, nuxt, typescript
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100