parcel-bundler/parcel
View on GitHubbun install replaces package.json with only process dependency
Open
#9302 opened on Oct 9, 2023
:raising_hand_woman: FeatureGood First Issue
Description
🐛 bug report
I wanted to use bun as a drop in replacement for node and yarn, while keeping bun as my bundler.
When running bun install then, my package.json gets replaced with a almost empty package.json, containing only 1 devDepenency.
🤔 Expected Behavior
I expect that installing it with bun should no different then installing dependencies with yarn.
😯 Current Behavior
My package.json:
{
"type": "module",
"devDependencies": {
"@types/react": "18.2.25",
"@types/react-dom": "18.2.11",
"@types/web": "0.0.116",
"bun-types": "1.0.5-canary.20231008T140131",
"parcel": "2.9.3",
"prettier": "3.0.3",
"process": "0.11.10"
},
"scripts": {
"start": "parcel public/index.html"
},
"peerDependencies": {
"typescript": "5.0.0"
},
"dependencies": {
"react": "18.2.0",
"react-dom": "18.2.0"
}
}
I run bun install
And package.json got replaced by purely this content:
{
"devDependencies": {
"process": "^0.11.10"
}
}
additionally, a package-lock.json appears
{
"name": "dump.link",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"devDependencies": {
"process": "^0.11.10"
}
},
"node_modules/process": {
"version": "0.11.10",
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
"integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==",
"dev": true,
"engines": {
"node": ">= 0.6.0"
}
}
}
}
💁 Possible Solution
yarn install
bun start
works. But I wanted to replace also yarn..
| Software | Version(s) |
|---|---|
| Parcel | 2.9.3 |
| Node | bun 1.0.4 |
| npm/Yarn | bun 1.0.4 |
| Operating System | Mac Os Sonoma latest |