Skip to content

Demos throw type error #17

@robinsonkwame

Description

@robinsonkwame

Checking out master and running demos gives,

bash-3.2$ yarn install
bash-3.2$ yarn compile
bash-3.2$ yarn demos
yarn run v1.15.2
$ yarn ts ./scripts/demos.ts
$ cross-env NODE_ENV=test ts-node -r tsconfig-paths/register -P tsconfig.all.json ./scripts/demos.ts

.../core/node_modules/ts-node/src/index.ts:253
    return new TSError(diagnosticText, diagnosticCodes)
           ^
TSError: ⨯ Unable to compile TypeScript:
scripts/demos.ts(19,3): error TS2345: Argument of type '{ stdio: string; cwd: string; }' is not assignable to parameter of type 'SpawnOptions'.
  Types of property 'stdio' are incompatible.
    Type 'string' is not assignable to type 'StdioOptions'.

    at createTSError (.../core/node_modules/ts-node/src/index.ts:253:12)
    at getOutput (.../core/node_modules/ts-node/src/index.ts:363:40)
    at Object.compile (.../core/node_modules/ts-node/src/index.ts:551:11)
    at Module.m._compile (.../core/node_modules/ts-node/src/index.ts:435:43)
    at Module._extensions..js (internal/modules/cjs/loader.js:732:10)
    at Object.require.extensions.(anonymous function) [as .ts] (.../core/node_modules/ts-node/src/index.ts:438:12)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
    at Function.Module._load (internal/modules/cjs/loader.js:552:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:774:12)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command

yet all tests pass successfully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions