create-nuxt-app
create-nuxt-app copied to clipboard
New app failing to compile, component imports not working
Hi there. I'm new to Nuxt.js so maybe I'm missing something, but I can't seem to figure this out. I created a new app following the usage, and when trying to run it locally with npm run dev I get the following error:
ERROR Failed to compile with 1 errors
ERROR in ./pages/index.vue
Module parse failed: Unexpected token (20:64)
File was processed with these loaders:
* ./node_modules/@nuxt/components/dist/loader.js
* ./node_modules/vue-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
|
| /* nuxt-component-imports */
> installComponents(component, {Logo: require('my-path\\nuxt-ts-template\\components\\Logo.vue').default,VuetifyLogo: require('my-path\\nuxt-ts-template\\components\\VuetifyLogo.vue').default})
|
|
@ ./.nuxt/router.js 13:24-15:3
@ ./.nuxt/index.js
@ ./.nuxt/client.js
@ multi ./node_modules/@nuxt/components/lib/installComponents.js eventsource-polyfill webpack-hot-middleware/client?reload=true&timeout=30000&ansiColors=&overlayStyles=&path=%2F__webpack_hmr%2Fclient&name=client ./.nuxt/client.js
This is with no additional changes. And is fixed when I comment out the Logo and VuetifyLogo components in the index.vue page. So that along with some of that error output leads me to think there is something wrong with the dynamic imports.
Here are the configuration options I chose:
Language: Typescript
Package manager: Npm
UI framework: Vuetify.js
Modules: [ Axios ]
Linting: None
Testing: None
Rendering mode: Universal
Target: Server
Tools: None
I'll be happy to provide any additional information. And if I should post this elsewhere, let me know.