question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Duplicated imports "definePageMeta" the one from "[app_root]/node_modules/nuxt3/dist/pages/runtime/composables" has been ignored.

See original GitHub issue

After a fresh install I keep getting this warning in the nuxi dev command console every time I save a file.

Environment

  • Operating System: Linux
  • Node Version: v16.13.1
  • Nuxt Version: 3.0.0-27459267.f69126e
  • Package Manager: yarn@1.22.17
  • Builder: vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

Steps to reproduce:

yarn nuxi init nuxt3-app
cd nuxt3-app
yarn install
yarn dev -o

Then I delete the app.vue file. Edit the nuxt.config.ts:

import { defineNuxtConfig } from 'nuxt3'
export default defineNuxtConfig({
	srcDir: './src'
})

Create the directory ./src. Create the directory ./src/pages. Create the file ./src/pages/index.ts.

Describe the bug

And I get the Warning:

Duplicated imports "definePageMeta" the one from "[app_root]/node_modules/nuxt3/dist/pages/runtime/composables" has been ignored.

How can this be fixed?

Additional context

No response

Logs

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:10
  • Comments:16 (7 by maintainers)

github_iconTop GitHub Comments

7reactions
bbaltutatcommented, Apr 26, 2022

Each time I save a file and it renders, it rewrites the file and adds another definePageMeta. This is any example of saving a file 3 times.

.nuxt/imports.d.ts

export { definePageMeta, definePageMeta, definePageMeta, definePageMeta } from 'xxxx/node_modules/nuxt/dist/pages/runtime/composables';

4reactions
lucassiminescommented, Apr 27, 2022

I’m having the same issue by saving a file inside compososables directory while running on dev mode

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found