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:

Comparing Mutative Vs Immer Vs Reducers For Data Handling In React

Comparing React state tools: Mutative vs. Immer vs. reducers

Mutative processes data with better performance than both Immer and native reducers. Let’s compare these data handling options in React.

Rashedul Alam
Apr 26, 2024 â‹… 7 min read
Radix Ui Adoption Guide Overview Examples And Alternatives

Radix UI adoption guide: Overview, examples, and alternatives

Radix UI is quickly rising in popularity and has become an excellent go-to solution for building modern design systems and websites.

Nefe Emadamerho-Atori
Apr 25, 2024 â‹… 11 min read
Understanding The Css Revert Layer Keyword, Part Of Css Cascade Layers

Understanding the CSS revert-layer keyword

In this article, we’ll explore CSS cascade layers — and, specifically, the revert-layer keyword — to help you refine your styling strategy.

Chimezie Innocent
Apr 24, 2024 â‹… 6 min read
Exploring Nushell, A Rust Powered, Cross Platform Shell

Exploring Nushell, a Rust-powered, cross-platform shell

Nushell is a modern, performant, extensible shell built with Rust. Explore its pros, cons, and how to install and get started with it.

Oduah Chigozie
Apr 23, 2024 â‹… 6 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