oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
74.27k stars 2.77k forks source link

Bun can't install dependencies on Windows. #14391

Open Sotorev opened 1 month ago

Sotorev commented 1 month ago

What version of Bun is running?

1.1.29+6d43b3662

What platform is your computer?

Microsoft Windows NT 10.0.22631.0 x64

What steps can reproduce the bug?

I was working on an API with bun 1.26, then I updated bun and the project does'nt work anymore. It always shows an error message saying Cannot find module... even I install those dependencies. Some of the folders in node_modules are empty too when I try to install dependencies.

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

Electroid commented 1 month ago

Can you share your package.json and what command you're running?

Sotorev commented 1 month ago
{
  "name": "api",
  "module": "index.ts",
  "type": "module",
  "scripts": {
    "dev": "bun --watch run ./src/app.ts",
    "start": "bun ./src/app.ts"
  },
  "devDependencies": {
    "@types/bcryptjs": "^2.4.4",
    "@types/cors": "^2.8.17",
    "@types/express": "^4.17.17",
    "bun-types": "latest"
  },
  "peerDependencies": {
    "typescript": "^5.0.0"
  },
  "dependencies": {
    "bcryptjs": "^2.4.3",
    "cors": "^2.8.5",
    "express": "^4.21.0",
    "jose": "^4.14.6",
    "mongodb": "^5.4.0",
    "zod": "^3.22.2"
  }
}

I tried the same package.json on Ubuntu and it works perfectly, it's just my Bun's Windows version. I'm running "bun install"

Sotorev commented 1 month ago

Image

On windows Image

I'm also watching that Windows version of bun, for some reason doesn't install anything inside some dependencies' folders. For example express.

sancho1952007 commented 2 weeks ago

I face this issue too. As a result, I have to use npm every time I need to install some dependency.