question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I can't read _**this.$store.state**_ when I run with `ts-node server/index.ts`

See original GitHub issue

Describe the bug I can’t read this.$store.state when I run with ts-node server/index.ts but I can when I run with yarn nuxt-ts

I checked it inside .nuxt

This image with ts-node server/index.ts

image

this image with yarn nuxt-ts

image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12

github_iconTop GitHub Comments

3reactions
kevinmarreccommented, Aug 29, 2019

@Him-2C Fixed it by adding that:

await nuxt.moduleContainer.ready()

just after https://github.com/Him-2C/nuxt-express-check-store/blob/master/server/index.ts#L11

This is something not documented in Programatically usage, but this need to be called so that modules are registered.

2reactions
Him-2Ccommented, Aug 29, 2019

So perfect like this.

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't run my Node.js Typescript project TypeError ...
It is just a basic ts.app like you see with ts-node and nodemon. I am really interested in what the answer is going...
Read more >
Getting Started with Executing TypeScript files in ts-node
In this tutorial, you'll learn how to use ts-node to execute TypeScript files while covering some of ts-node's benefits over traditional ...
Read more >
How to set up TypeScript with Node.js and Express
Start by creating a new directory wherever you keep your side projects in your local development environment.
Read more >
Getters | Vuex
Vuex allows us to define "getters" in the store. You can think of them as computed properties for stores. WARNING. As of Vue...
Read more >
Experimenting With ts-node And Using TypeScript In Node.js ...
So, naturally, I wanted to see if I could use it in other JavaScript contexts. To this point, however, Ward explained that I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found