mattpocock / mattpocock/typescript-node

run script "dev" fail in the first time

Open
#1 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
67
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Hello Matt, thank you for sharing this useful guidance.

I find out there is a bug when execute the "run dev" script.

Because of the dev:node and dev:tsc is running in paralle, dev:node will crush when there is no dist folder created.

This can be fixed by adding a wait-on before ececuting the transpiled file.

ex:
"dev:node": "wait-on dist/index.js && node --enable-source-maps --watch dist/index.js"

I hope it works, thanks you.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect the package scripts for dev:node and dev:tsc, then run the run dev command with no dist folder present to reproduce the failure. The issue is done when the development command waits for dist/index.js to be created before starting the watched Node process.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
build-system, tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.