Questions tagged [ts-node-dev]
29 questions
1
vote
2 answers
Unable to infer GraphQL type from TypeScript reflection system. You need to provide explicit type for 'id' of 'Address' class
import { ObjectType, ID, Int, Field } from 'type-graphql';
@ObjectType()
export default class Address {
@Field(type => ID)
id: String;
@Field()
type: string;
@Field()
title: string;
@Field()
location: string;
}
info: ts-node-dev…

Hitesh Shingala
- 11
- 1
- 4
1
vote
0 answers
Is it possible to use `ts-node-dev` to run a npm script?
I like ts-node-dev and I'm trying to avoid adding nodemon as a dev-dependence.
Nodemon allows executing an arbitrary command on current path when a watched file changes. I think that aligns nicely to create wacth versions of npm scripts:
// on…

Gerardo Lima
- 6,467
- 3
- 31
- 47
1
vote
0 answers
Typescript: Compilation Error only when using Docker
So I have this weird error when Typescript would throw a Compilation Error when I try to to run my app using Docker. This error does not happen when I run it locally on my computer.
My Dockerfile
FROM node:alpine
WORKDIR /app
COPY package.json…

Nam
- 554
- 4
- 11
0
votes
1 answer
package.json ts-node-dev parameter: --cache-directory and TS_NODE_CACHE_DIRECTORY
I am using ts-node-dev and I need to change its cache directory (defaults to the operating system's temporary directory).
I have two commands defined in a package.json file, a start and a start-custom-cache like so:
"scripts": {
…

Blitzkoder
- 1,768
- 3
- 15
- 30
0
votes
1 answer
TS Node - Must use import to load ES Module: server/src/index.ts
I am trying to start a typescript node project and I've installed some dependencies (typescript, eslint, mongoose and graphql). However, when I run
ts-node-dev --respawn --transpile-only src/index.ts
I get the error
Must use import to load ES…

Will Zap
- 83
- 8
0
votes
0 answers
ts-node "interpreter" does not allow me to run typescript file without opening powershell (node spawn)
My question is about the ts-node interpreter.
I am making an application that allows code to execute as soon as I save the file (nodemon type).
The problem is that I cannot execute the command with a simple spawn since I am forced to open the…
0
votes
1 answer
ts-node-dev hot reaload dose not recognize my import file in index.ts
My server index.ts file import consoleColorFy.ts
consoleColorFy.ts
declare global {
interface Console {
redBg: TConsoleFn;
}
}
console["redBg"] = ...
Now i can use console.redBg().
It works well in most time but when hot-reload some…

MINJA KIM
- 876
- 1
- 8
- 22
0
votes
0 answers
How to watch ts,js,graphql extensions in ts-node-dev?
I am trying to run the node server by ts-node-dev and restart on any any changes in specific files. It is restarting on any changes made to ts,js files however, it is not restarting on changes to graphql files. Any suggestions?
"scripts": {
…

Hazem Alabiad
- 1,032
- 1
- 11
- 24
0
votes
1 answer
Is there any way to stop ts-node-dev?
I'm trying to make a Discord bot that can shut down on command. Yesterday I asked another question related to this but no one answered. So now I'm thinking is there any way to stop ts-node-dev from command line / .ts file?

ProGamer2711
- 451
- 1
- 5
- 18
0
votes
1 answer
How to import files in nodejs in order to fit tsc build & ts-node-dev?
When I am working with ts-node-dev, imported files must be named like "./api" or "./api.ts" and when the project is built (using tsc), I need "./api.js" (which is normal... it becomes pure js).
Is there a way to make ts understand that .js imports…

Crapaud
- 1
- 1
0
votes
1 answer
Type 'Article | null' is not assignable to type 'void'
I am trying to implement an interface into a class using typescript.
This is my class:
import connector from '../../../../common/mysql.persistence'
import { Article } from '../../domain/article'
import { ArticleRepository } from…

Diesan Romero
- 1,292
- 4
- 20
- 45
0
votes
0 answers
How to solve memory heap error ts-node-dev?
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
During development, memory heap errors keep coming up and development is delayed.
I set node memory to prevent this, but I don't know if it…

minjae kim
- 139
- 2
- 9
0
votes
1 answer
Why does apify-shared npm package print 'log error'
Using the apify-shared
npm package, when I try to run a project, I get the error message:
[INFO] 08:52:24 ts-node-dev ver. 1.1.6 (using ts-node ver. 9.1.1, typescript ver. 3.9.9)
Error: Options "level" must be one of log.LEVELS enum!
at new Log…

microworlds
- 67
- 8
0
votes
1 answer
Npm i ts-node-dev --save-dev leads to no such file or directory, chmod node_modules/ts-node-dev/lib\bin.js'
I try to install ts-node-dev:
npm i ts-node-dev --save-dev
And get the error:
ENOENT: no such file or directory, chmod
'/node_modules/ts-node-dev/lib\bin.js'

mr_blond
- 1,586
- 2
- 20
- 52