hackernews-nuxt-ts icon indicating copy to clipboard operation
hackernews-nuxt-ts copied to clipboard

Module parse failed: Unexpected character '@'

Open huoguozhang opened this issue 5 years ago • 5 comments

when i clone this project and execute npm run dev, occur this wrong system: mac node version: 10.15.3

Module parse failed: Unexpected character '@' (37:0)  friendly-errors 22:03:46
File was processed with these loaders:
 * ./node_modules/vue-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
| import LazyWrapper from "~/components/lazy-wrapper.vue"
| 
> @Component({
|   components: {
|     Comment,
                    

huoguozhang avatar Sep 04 '19 14:09 huoguozhang

same

feng-fu avatar Sep 06 '19 07:09 feng-fu

cc @kevinmarrec I guess we have to update the example to the new typescript integration?

TheAlexLichter avatar Sep 06 '19 08:09 TheAlexLichter

This project is indeed not up to date, TypeScript support have been externalized so using last Nuxt version with @nuxt/typescript instead of @nuxt/typescript-build (https://typescript.nuxtjs.org/guide/setup.html) won't work.

Yes indeed @manniL. I won't have time doing this, may be cool if someone maintaining this repo takes care of it, I'll review it.

kevinmarrec avatar Sep 06 '19 20:09 kevinmarrec

what's the solution?

crhistianramirez avatar Dec 05 '19 04:12 crhistianramirez

you can install @nuxt/typescript-runtime, and use nuxt-ts instead of nuxt

Kaviilee avatar Oct 09 '20 07:10 Kaviilee