这是indexloc提供的服务,不要输入任何密码
Skip to content

Watch mode gives SIGABRT error once built #1171

@FilipPyrek

Description

@FilipPyrek

Cause

After this change was introduced #1142 by @SunsetTechuila via release v8.2.1 we started to get SIGABRT error in watch mode.

Error

ESM dist/files/index.js                                    3.85 KB
ESM ⚡️ Build success in 87ms
CLI Watching for changes in "."
CLI Ignoring changes in "**/{.git,node_modules}/**" | "dist"
DTS Build start
DTS ⚡️ Build success in 13504ms
ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL  Command was killed with SIGABRT (Aborted): tsup-node --dts --no-splitting --tsconfig ./tsconfig.dev.json --format esm --watch
ELIFECYCLE  Command failed with exit code 1.

image

Temporary fix

Reverting back to 8.2.0 fixed it for me.

Debugging

When I removed worker.terminate() from src/index.ts it worked without throwing any error. ✅

worker.on('message', (data) => {
  if (data === 'error') {
-   worker.terminate()
    reject(new Error('error occured in dts build'))
  } else if (data === 'success') {
-   worker.terminate()
    resolve()
  } else {
    const { type, text } = data

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions