entity icon indicating copy to clipboard operation
entity copied to clipboard

NUXT Build Warning ProseCode

Open rstens opened this issue 1 year ago • 3 comments

NOTE: We will put you in touch with a team/developer that has expertise in NUXT.

During builds of name-examination the following warnings show up:

WARN  [nuxt] Two component files resolving to the same name ProseCode:                                                                                           9:29:02 a.m.

 - /home/rstens/name-examination/node_modules/@nuxtjs/mdc/dist/runtime/components/prose/ProseCode.vue
 - /home/rstens/name-examination/node_modules/@nuxt/content/dist/runtime/components/Prose/ProseCode.vue


 WARN  [nuxt] Two component files resolving to the same name ProsePre:                                                                                            9:29:02 a.m.

 - /home/rstens/name-examination/node_modules/@nuxtjs/mdc/dist/runtime/components/prose/ProsePre.vue
 - /home/rstens/name-examination/node_modules/@nuxt/content/dist/runtime/components/Prose/ProsePre.vue

Guidance found on this:

As stated in https://github.com/nuxt/content/issues/2266#issuecomment-1720124274 There are no warnings logged with Content v2.8.2 and Nuxt v3.7.2 anymore.

So just upgrade to: nuxt/content >= 2.8.2 and nuxt >= 3.7.2

Make sure to run the following command afterwards ''' npx nuxi upgrade --force ''' It'll delete your lockfile and node_modules folder to make sure you'll get the new versions.

Caveat: Other issues might pop up.

rstens avatar May 16 '24 16:05 rstens

@Mihai-QuickSilverDev I'm not sure Cameron has worked with Nuxt yet. Maybe contact the teams that are?

thorwolpert avatar May 17 '24 05:05 thorwolpert

Thank you @thorwolpert , I was just the scribe for that comment. I think we knew that Assets completed Vue 3, was not clear if they did Nuxt or not. I think that you led at least a couple of Nuxt implementations - could you recommend a resource for the purposes of this ticket? Alternatively we could contact maybe RTR/Kial. I can also check with Patrick Wei to see if there are any software architecture diagrams identifying what stack each of the teams is on. Thanks again!

Mihai-QuickSilverDev avatar May 17 '24 05:05 Mihai-QuickSilverDev

I forwarded a link of the app stacks to Omid

thorwolpert avatar May 17 '24 05:05 thorwolpert

I followed the steps above, set nuxt/content >= 2.8.2 and nuxt >= 3.7.2 The warnings are disappeared and it works.

However, I had to start from downloading the Namex Git repository again. If I don't, any changes cause the following error:

[2:32:27 PM]  ERROR  [uncaughtException] This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "Search string not found: "for (const existingRoot of buildInfoVersionMap.roots) {"".

Or other wired errors and warnings....

By the way, running "npx nuxi upgrade --force" installs [email protected]. I still got the same error as above or errors like

 ERROR                                                                  3:29:40 PM
 ERROR(vue-tsc)  Cannot find module '~/components/search/ResultsBox.vue' or its corresponding type declarations.
 FILE  /home/evedeng/projects/name-examination/app/tests/component/SearchResultsBox.spec.ts:3:30

    1 | import { beforeEach, describe, it, expect } from 'vitest'
    2 | import { mount } from '@vue/test-utils'
  > 3 | import SearchResultsBox from '~/components/search/ResultsBox.vue'
      |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    4 | import mockNameRequests from '../data/mockNameRequests.json'
    5 | import mockZeroNameRequests from '../data/mockZeroNameRequests.json'
    6 | import { useSearchStore } from '~/store/search'

It is frustrating.

eve-git avatar Jun 21 '24 22:06 eve-git

@rarmitag do you think I can commit code? Do you know how to resolve the error?

eve-git avatar Jun 21 '24 22:06 eve-git

steps:

  1. clone a clean name-examination to disk
  2. modify package.json:
"@nuxt/content": "^2.8.2",
"nuxt": ^3.7.2

run:

> npm i
> npm run dev

The app starts without the warning

check nuxt version:

[email protected] /home/evedeng/projects/name-examination/app
├─┬ @nuxt/[email protected]
│ └─┬ @vueuse/[email protected]
│   └── [email protected] deduped
└── [email protected]

eve-git avatar Jun 21 '24 22:06 eve-git

There is no need to test in the UI. It's a build warning, so since the warning is fixed, we can move it to "Done".

hanlunBCRegistries avatar Jul 30 '24 17:07 hanlunBCRegistries