2020-03-17
2442
#nuxtjs#typescript
Preetish HS
15712
Mar 17, 2020 â‹… 8 min read

How to set up and code Nuxt.js apps fully in TypeScript

Preetish HS Freelance web developer, digital nomad, and design enthusiast. You can find me online at preetish.in.

Recent posts:

Rxjs Adoption Guide: Overview, Examples, And Alternatives

RxJS adoption guide: Overview, examples, and alternatives

Get to know RxJS features, benefits, and more to help you understand what it is, how it works, and why you should use it.

Emmanuel Odioko
Jul 26, 2024 â‹… 13 min read
Decoupling Monoliths Into Microservices With Feature Flags

Decoupling monoliths into microservices with feature flags

Explore how to effectively break down a monolithic application into microservices using feature flags and Flagsmith.

Kayode Adeniyi
Jul 25, 2024 â‹… 10 min read
Lots of multi-colored blue and purplish rectangles.

Animating dialog and popover elements with CSS @starting-style

Native dialog and popover elements have their own well-defined roles in modern-day frontend web development. Dialog elements are known to […]

Rahul Chhodde
Jul 24, 2024 â‹… 10 min read
Using Llama Index To Add Personal Data To Large Language Models

Using LlamaIndex to add personal data to LLMs

LlamaIndex provides tools for ingesting, processing, and implementing complex query workflows that combine data access with LLM prompting.

Ukeje Goodness
Jul 23, 2024 â‹… 5 min read
View all posts

10 Replies to "How to set up and code Nuxt.js apps fully in TypeScript"

  1. Preetish many thanks for this, great post! How I can work with functional components and JSX in this mode? thanks!

  2. Using actions similar to mutations gives out an `ERR_ACTION_ACCESS_UNDEFINED` error. Tried researching online but no luck. Anything wrong that I’m doing here ?

  3. I ran following command
    npm run build

    which generated .nuxt folder when I tried to run that using “node server.js”, it gives me following error.

    C:\Users\Meera\Downloads\nuxt-typescript-example-master\nuxt-typescript-example-master\.nuxt\server.js:1
    import Vue from ‘vue’
    ^^^^^^

    SyntaxError: Cannot use import statement outside a module
    at wrapSafe (internal/modules/cjs/loader.js:979:16)
    at Module._compile (internal/modules/cjs/loader.js:1027:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47

Leave a Reply