Inflearn brand logo image

Inflearn Community Q&A

ash's profile image
ash

asked

Applying TypeScript to Node.js (feat. NodeBird)

express middleware

nodemon

Written on

·

219

0

저 혹시 node typescript 에서 nodemon 을 설치해서 실행시킬려고하는데여 

설치는 npm install -D nodemon 했구 

package.json 에선 설정을 

  "scripts": {

    "dev": "nodemon",

    "start": "tsc && node index"

  },

으로 했는데여 실행을 npm run dev 로 하니깐. 

cannot find module index.js 라고 나오더라구요. 

npx ts-node index.ts 로는 실행이 되는데 , 

어디가 잘못됬을까요 ?

웹앱typescriptnodejs

Answer 1

0

zerocho님의 프로필 이미지
zerocho
Instructor

nodemon은 js파일만 실행할 수 있습니다. ts파일은 실행 못합니다. ts파일은 ts-node로 실행하세요.

ash's profile image
ash

asked

Ask a question