Closed samislam closed 6 months ago
I want to run tsc & tsc-alias & node --watch all at the same time.
tsc & tsc-alias & node --watch
so basically I have an npm script like this:
"scripts": { "dev": "tsc && (concurrently \"tsc -w\" \"tsc-alias -w\" \"node --watch ./dist/main.js \" )" }
How can I enable this correctly? any helps.
2:29:05 PM - Starting compilation in watch mode... [0] [1] tsc-alias info: 20 files were affected! [1] tsc-alias info: [Watching for file changes...] [1] tsc-alias info: 7 files were affected! [1] tsc-alias info: [Watching for file changes...] [2] [2] > dma-restful-api@1.0.0 start2 [2] > environment=development node --watch ./dist/main.js [2] [2] (node:355062) ExperimentalWarning: Watch mode is an experimental feature and might change at any time [2] (Use `node --trace-warnings ...` to show where the warning was created) [2] [info] Authenticating with DMA... [2] - Authenticating with DMA... [2] (node:355071) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. [2] (Use `node --trace-deprecation ...` to show where the warning was created) [2] ✔ Authenticating with DMA... [2] [success] Authentication with DMA success! [2] [info] Initializing Database connection [2] - Initializing Database connection... [2] ✔ Initializing Database connection... [2] [success] Successfully connected to the DMA Database! [2] [success] successfully initiated the HTTP service on port 3001 [2] [info] System's HTTP service is now listening on [http://localhost:3001] [2] Restarting './dist/main.js' [2] Restarting './dist/main.js' [2] Restarting './dist/main.js' [2] Restarting './dist/main.js' [2] Restarting './dist/main.js' [2] Restarting './dist/main.js' [2] Restarting './dist/main.js' [2] Restarting './dist/main.js' [2] Restarting './dist/main.js' [2] Restarting './dist/main.js' [2] Restarting './dist/main.js' [2] Restarting './dist/main.js' [2] Restarting './dist/main.js' [2] Restarting './dist/main.js' [2] Restarting './dist/main.js' [2] Restarting './dist/main.js' [2] Restarting './dist/main.js' [0] [0] 2:29:08 PM - Found 0 errors. Watching for file changes. [2] Restarting './dist/main.js' [2] Restarting './dist/main.js' [2] Restarting './dist/main.js' [2] Restarting './dist/main.js' [2] Restarting './dist/main.js' [2] Restarting './dist/main.js' [2] Restarting './dist/main.js' [2] Restarting './dist/main.js' [2] node:internal/modules/esm/resolve:853 [2] throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), null); [2] ^ [2] [2] Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@/tools' imported from ~/dist/server/Dma.class/Dma.class.js [2] at packageResolve (node:internal/modules/esm/resolve:853:9) [2] at moduleResolve (node:internal/modules/esm/resolve:910:20) [2] at defaultResolve (node:internal/modules/esm/resolve:1130:11) [2] at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:396:12) [2] at ModuleLoader.resolve (node:internal/modules/esm/loader:365:25) [2] at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:240:38) [2] at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39) [2] at link (node:internal/modules/esm/module_job:84:36) { [2] code: 'ERR_MODULE_NOT_FOUND' [2] } [2] [2] Node.js v21.4.0 [2] Failed running './dist/main.js'
I want to run
tsc & tsc-alias & node --watch
all at the same time.so basically I have an npm script like this:
How can I enable this correctly? any helps.