Skip to content

Import Error #531

@childrentime

Description

@childrentime

Environment details

  • OS: win
  • OS version: 10
  • node-pty version: ^0.10.1

Issue description

when i use ts-node and typescript
import pty from 'node-pty';

const term = pty.spawn(shell, ['--login'], {
    name: 'xterm-color',
    cols: 80,
    rows: 24,
    cwd: process.env.HOME,
});

it will throw error TypeError: Cannot read property 'spawn' of undefined';

and when i change to const pty = require('node-pty');

it works

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions