NUXT: Could not compile template

可紊 提交于 2019-12-11 02:27:45

问题


I'm getting started with nuxt. My project structure in the screenshot, I've got a vuetify carousel component that was working fine with urls as the src. Now I want to try to serve local static files. I tried:

    <template>
  <v-carousel>
    <v-carousel-item v-for="(item,i) in items" :key="i" :src="item.src"></v-carousel-item>
  </v-carousel>
</template>


    <script>

export default {
  data () {
    return {
      items: [
        {
          src: '/static/52lv.PNG'
        },
        {
          src: 'https://cdn.vuetifyjs.com/images/carousel/sky.jpg'
        },
        {
          src: 'https://cdn.vuetifyjs.com/images/carousel/bird.jpg'
        },
        {
          src: 'https://cdn.vuetifyjs.com/images/carousel/planet.jpg'
        }
      ]
    }
  }
}
</script>

but now when I run the dev server I get:

$ npm run dev

> nuxt4@1.0.0 dev ....\js\nuxt4
> nuxt

i Preparing project for development                                                                                                                   20:23:25
i Initial build may take a while                                                                                                                      20:23:25
√ Builder initialized                                                                                                                                 20:23:25

ERROR  Could not compile template ....nuxt4\\node_modules\\@nuxt\\vue-app\\template\\App.js: Cannot resolve "~/assets/style/app.styl" from "E:\ENVS\js\nuxt4\assets\style\app.styl"

at Promise.all.templatesFiles.map (node_modules\@nuxt\builder\dist\builder.js:6009:17)

What am I doing wrong?

来源:https://stackoverflow.com/questions/54015346/nuxt-could-not-compile-template

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!