#Layer Extend broken on Vercel

24 messages · Page 1 of 1 (latest)

chrome skiff
#

Hi

Using the mono repo strategy for Nuxt Layer causes deployments to fail on Vercel, if they contain just a single import of a component from a base layer.

Component:

// Layer 1 (base) - Counter.vue
<template>
  <div>
    Hello World
  </div>
</template>
// Layer 2
<template>
  <div>
    <Counter />
  </div>
</template>

Deploying an extended Nuxt project on Vercel that contains a component, causes Rollup to fail:
[error] [vite]: Rollup failed to resolve import "vue/server-renderer" from "/vercel/path0/base/components/Counter.vue"

Reproduction:
https://github.com/madsh93/layer-min-repo

Should also be noted if any modules are using in the component, they will fail to import as well.

chrome skiff
#

@random abyss I think this may be the issue you are encountering as well. The second layer you are extending is, i'm assuming, using a component. Seems components are causing fails in deployment. The error message you are getting is not Rollup failed to resolve import "vue/server-renderer" but something from the component inside the layer.

random abyss
#

humm

#

good morning

#

in this case is the component itself, say my component? or would it be the component design?

#

did you have the same problem?

chrome skiff
#

Are you using a component from layer that is failing?

random abyss
#

I'm using two, only one was what I developed the other is the nuxt SEO kit...

#

if i just use what i made it works

#

now it is not possible to analyze it well, but at night I will see what you said

#

thanks

chrome skiff
#

Yeah, I would try to keep both extended layers and comment out the component you use.

random abyss
#

so I'm using these:
extends: ['nuxt-seo-kit','github:SoftagonSistemas/components']

being that from github is what contains the project developed by me

random abyss
#

would I be interested in discussing it in the evening?

#

I really want to understand what the problem is where I'm going wrong

chrome skiff
#

I don't think you are doing anything wrong. I believe Nuxt has a bug where it will fail deployment as soon as you extend and use a component.

random abyss
#

Humm

#

I thought that would be it too

random abyss
#

hello good night, now analyze what you said earlier ....

#

how do i know if my component is failing?

#

currently it is being used in 3 sites

#

it's working

#

however the fourth site it uses the SEO kit which is an extend when using my extend(my component) it in development mode it works, but when trying to build it to deploy it it gives this error....