Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(scripts): use ts-node for start script #2052

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

caugner
Copy link
Contributor

@caugner caugner commented Jan 2, 2025

Before

% npm start

> [email protected] start
> node app.js

node:internal/modules/cjs/loader:1228
  throw err;
  ^

Error: Cannot find module '/Users/claas/github/openwebdocs/mdn-bcd-collector/app.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
    at Module._load (node:internal/modules/cjs/loader:1051:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
    at node:internal/main/run_main_module:28:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v20.18.0

After

% npm start

> [email protected] start
> node --loader=ts-node/esm --no-warnings=ExperimentalWarning app.ts

info: Listening on port 8080 (HTTP)
info: Press Ctrl+C to quit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant