Skip to content

fix(rcfile): tsx dependency fails when run in a devcontainer #313

@Yuxiang-Huang

Description

@Yuxiang-Huang

Syncpack version

14.0.0-alpha.34

Operating system(s)

Mac

Steps to reproduce

  1. git clone [email protected]:Yuxiang-Huang/syncpack-alpha-devcontainer-bug.git

  2. Open the repo in a VS Code devcontainer.

  3. Run bun install

  4. Run bunx syncpack lint

Bug Reproduction GitHub Repo

Expected behavior

Syncpack succeeds with

✓ No issues found

Actual behavior

Syncpack throws the following error:

 ✗ Node.js/npx/tsx process failed with stderr: error: Cannot find module './cjs/index.cjs' from ''

 Bun v1.3.2 (Linux arm64)

Contents of syncpack configuration file

export default {
    indent: "    ",
} satisfies import("syncpack").RcFile;

Optional comments

The bunx syncpack lint runs successfully if you add a .syncpackrc.json file to the root of the project.

For example, with the following content:

{
  "$schema": "./node_modules/syncpack/dist/schema.json",
  "indent": "    "
}

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions