microsoft/just

nodeExecTask "successful" when it can't find the module

JasonGore opened this issue · 0 comments

I was trying nodeExecTask in a situation where it shouldn't have worked and discovered it doesn't error when the module it tries to run doesn't exist:

$ just-scripts wacbuild
[2:34:45 PM] ■ started 'wacbuild'
[2:34:45 PM] ■ [TS] Using these compilerOptions: {"module":"commonjs","target":"es2017","moduleResolution":"node"}
[2:34:45 PM] ■ [TS] Using transpileOnly mode
[2:34:45 PM] ■ Executing [TS]: C:\Program Files\nodejs\node.exe -r D:\git\ooui\dev\node_modules\ts-node\register\index.js ./wacBuiasdfldRun.ts
[2:34:45 PM] ■ finished 'wacbuild' in 0.01s
Error: Cannot find module 'D:\git\ooui\dev\packages\wac-box3\wacBuiasdfldRun.ts'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
    at Function.Module._load (internal/modules/cjs/loader.js:842:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47
Done in 1.84s.

image