Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not pass posix paths to Windows APIs, was given '\lib\esm\in'. #11351

Open
AliceCooper214 opened this issue May 25, 2024 · 0 comments
Open
Labels
crash An issue that could cause a crash windows An issue that only occurs on Windows

Comments

@AliceCooper214
Copy link

AliceCooper214 commented May 25, 2024

How can we reproduce the crash?

When I try to import an external file for a function and run this code, the code will throw an exception about bun.

JavaScript/TypeScript code that reproduces the crash?

//location: ./transform.ts
export function transformHtmlToVue(input: string) {
// ignore code
}
// location ./index.ts
import { transformHtmlToVue } from "./transform";

// and use
//package.json
{
  "version": "1.0.0",
  "description": "",
  "module": "index.ts",
  "type": "module",
  "scripts": {
    "start": "bun run index.ts"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "cheerio": "1.0.0-rc.12",
    "figlet": "^1.7.0",
    "ofetch": "^1.3.4",
    "p-limit": "^5.0.0"
  },
  "devDependencies": {
    "@types/bun": "^1.0.0",
    "@types/figlet": "^1.5.8",
    "typescript": "^5.4.5"
  }
}


### Relevant log output

```shell
============================================================
Bun v1.1.10 (5102a944) Windows x64
Args: "C:\Users\~\.bun\bin\bun.exe" "run" "index.ts"
Features: jsc tsconfig(2) 
Builtins: "bun:main" 
Elapsed: 57ms | User: 0ms | Sys: 15ms
RSS: 116.54MB | Peak: 116.54MB | Commit: 0.16GB | Faults: 28689

panic(main thread): Internal Error: Do not pass posix paths to Windows APIs, was given '\lib\esm\in'. Please open an issue on GitHub with a reproduction.
oh no: Bun has crashed. This indicates a bug in Bun, not your code.

To send a redacted crash report to Bun's team,
please file a GitHub issue using the link below:

 https://bun.report/1.1.10/wr15102a94AiggggEkzgrT+0l9Pu917Kgsm6L6uh7GotqSs/ryG2/pzJitmyJun40JA0eNoFwTEOwjAMBdCr/K0L6gHYkEDQrRtLFpda1FKwI9shHJ/3Fk12pYqbu/kZV4NaolEEmoX80CiPQBqeoruNwGVd4oRBgbd8WTGVKlvh+BTRacZamYJhjRWkkIjOMMVd8tE3DMkDBOfmtvdXiun8B1kBL0s

error: script "start" exited with code 3

Stack Trace (bun.report)

Bun v1.1.10 (5102a94) on windows x86_64 [RunCommand]

panic: Internal Error: Do not pass posix paths to Windows APIs, was given '\lib\esm\in'. Please open an issue on GitHub with a reproduction.

@AliceCooper214 AliceCooper214 added the crash An issue that could cause a crash label May 25, 2024
@Electroid Electroid added the windows An issue that only occurs on Windows label May 27, 2024
@Electroid Electroid changed the title panic(main thread): Internal Error: Do not pass posix paths to Windows APIs, was given '\lib\esm\in'. Do not pass posix paths to Windows APIs, was given '\lib\esm\in'. May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash An issue that could cause a crash windows An issue that only occurs on Windows
Projects
None yet
Development

No branches or pull requests

2 participants