Static GitHub Issues

[2949] Can't import Nuxt Link in SSR mode

prev: Read browserslist if available
next: Object.values error on iOS9

I need to import NuxtLink in my project; but it doesn't work in Nuxt when it's rendered on the server.

My page is

<template>
  <h1>Hello world!</h1>
</template>
<script>
import NuxtLink from 'nuxt/lib/app/components/nuxt-link'

console.log(NuxtLink)
</script>

It works in SPA mode; but I get the following warning:

17:2-16 "export 'default' (imported as '__vue_script__') was not found in '!!babel-loader?{"babelrc":false,"cacheDirectory":true,"presets":[["/app/node_modules/babel-preset-vue-app/dist/index.common.js",{"targets":{"ie":9,"uglify":true}}]]}!../node_modules/vue-loader/lib/selector?type=script&index=0!./index.vue'

However; in SSR mode I get the following error:

<img width="1242" alt="screenshot 2018-03-05 10 36 25" src="https://user-images.githubusercontent.com/13302836/36967818-13f4f58c-2061-11e8-8ac8-af3753f452fa.png"><!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2557">#c2557</a>)</em></sub></div>