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:

Integrating Django Templates With React For Dynamic Webpages

Integrating Django templates with React for dynamic webpages

Create a dynamic demo blog site using Django and React to demonstrate Django’s server-side functionalities and React’s interactive UI.

Kayode Adeniyi
Apr 18, 2024 â‹… 7 min read
Using Aoi Js To Build A Bot For Discord

Using aoi.js to build a bot on Discord

Explore how the aoi.js library makes it easy to create Discord bots with useful functionalities for frontend applications.

Rahul Padalkar
Apr 17, 2024 â‹… 9 min read
Web Components Adoption Guide: Overview, Examples, And Alternatives

Web Components adoption guide: Overview, examples, and alternatives

Evaluate Web Components, a set of standards that allow you to create custom HTML tags for more reusable, manageable code.

Elijah Asaolu
Apr 16, 2024 â‹… 11 min read
Using Aws Lambda And Aws Cloudfront To Optimize Image Handling

Using AWS Lambda and CloudFront to optimize image handling

Leverage services like AWS Lambda, CloudFront, and S3 to handle images more effectively, optimizing performance and providing a better UX.

Nitish Sharma
Apr 12, 2024 â‹… 12 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