lorensr/temporal-time-utils

package does not seem to work with ts-node in samples-typescript

devdoshi opened this issue · 0 comments

Thanks for making this package!

I've installed and imported temporal-time-utils in an example from temporal samples-typescript but when I try to run my workflow:

$ npm run workflow

> temporal-hello-world@0.1.0 workflow
> ts-node src/client.ts

samples-typescript/hello-world/node_modules/temporal-time-utils/index.ts:1
export { UpdatableTimer } from "./UpdatableTimer";
^^^^^^
SyntaxError: Unexpected token 'export'
    at Object.compileFunction (node:vm:352:18)
    at wrapSafe (node:internal/modules/cjs/loader:1033:15)
    at Module._compile (node:internal/modules/cjs/loader:1069:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Object.require.extensions.<computed> [as .ts] (samples-typescript/hello-world/node_modules/ts-node/src/index.ts:1587:43)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:827:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (samples-typescript/hello-world/src/workflows.ts:4:1)

I'm guessing it was published without the build output.