• 카테고리

    질문 & 답변
  • 세부 분야

    프로그래밍 언어

  • 해결 여부

    미해결

tsx 오류 없이 실행이 안됩니다

24.02.26 15:17 작성 24.02.26 15:20 수정 조회수 167

0

tsx 오류 없이 실행이 안됩니다ㅠㅠ

별 다른 메시지가 뜨지 않고 단지 실행이 안됩니다ㅠㅠ

어떤걸 확인하면 좋을까요..?

 

설치도 진행한 상태입니다..

 

{
  "name": "section2",
  "version": "1.0.0",
  "lockfileVersion": 3,
  "requires": true,
  "packages": {
    "": {
      "name": "section2",
      "version": "1.0.0",
      "license": "ISC",
      "dependencies": {
        "@types/node": "^20.11.17"
      }
    },
    "node_modules/@types/node": {
      "version": "20.11.17",
      "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.17.tgz",
      "integrity": "sha512-QmgQZGWu1Yw9TDyAP9ZzpFJKynYNeOvwMJmaxABfieQoVoiVOS6MN1WSpqpRcbeA5+RW82kraAVxCCJg+780Qw==",
      "dependencies": {
        "undici-types": "~5.26.4"
      }
    },
    "node_modules/undici-types": {
      "version": "5.26.5",
      "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
      "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="
    }
  }
}
{
  "name": "section2",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "type": "module",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "@types/node": "^20.11.17"
  }
}

 

{
  "compilerOptions": {
      "target" : "ESNext",
      "module": "ESNext",
      "outDir": "dist",
      "strict": true,
      "moduleDetection": "force",
      "skipLibCheck": true,
  },
  "ts-node": {
    "esm": true
  },
  "include": ["src"]
}

답변 3

·

답변을 작성해보세요.

0

devstudy04님의 프로필

devstudy04

2024.03.24

dist폴더가 생성이 안되고 js파일이 생성되는데 어떤 부분을 확인해야 할까용?

tsconfig.json의 outDir 옵션을 확인해보시면 됩니다!

이 옵션의 값을 "dist"로 설정해주셔야 해당 폴더에 js 파일이 생성됩니다.

0

안녕하세요 이정환입니다.

우선 별다른 오류 메세지가 없는걸로보아 tsx는 정상적으로 잘 실행된 것 같은데요,

src/chapter5.ts 파일에 console.log를 통해 콘솔에 출력하는 메세지가 없는것 같아보입니다.

해당 부분을 한번 확인해보시면 좋을 것 같습니다.

0

김진영님의 프로필

김진영

2024.02.26

  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
김진영님의 프로필

김진영

2024.02.26

"start": "react-scripts start", 이게 없어서 안되는거 같아요 제생각에는