Comments (5)
Not able to reproduce on macOS or an EC2 VM. Does the gitlab workflow happen to be public?
from bun.
Here is a repo reproducing the issue : https://github.com/Leni-Vienne/bun_dev_dependencies_issue
I've tried to narrow it down more but it gets quite unpredictable with the bun.lockb file in the way and I had to add some production dependencies to reproduce the bug
from bun.
Confirming I'm able to reproduce the issue locally.
Minimal reproduction:
Put this into package.json:
{
"devDependencies": {
"underscore": "1.9.1",
"lodash": "4.17.21"
}
}
Then run bun install
.
It installs successfully:
❯ bun install
bun install v1.0.32 (7c9f0763)
+ lodash@4.17.21
+ underscore@1.9.1 (v1.13.6 available)
2 packages installed [183.00ms]
Then, manually edit your package.json to look like this:
{
"devDependencies": {
"underscore": "1.9.1",
"lodash": "4.17.21"
},
"dependencies": {
"lodash": "4.17.21"
}
}
Note the "dependencies"
there.
Then run bun install --production
:
❯ bun install --production
bun install v1.0.32 (7c9f0763)
4 | "lodash": "4.17.21"
^
warn: Duplicate dependency: "lodash" specified in package.json
at /Users/jarred/Desktop/reproo/package.json:4:5
7 | "lodash": "4.17.21"
^
note: "lodash" originally specified here
at /Users/jarred/Desktop/reproo/package.json:7:15
Checked 1 install across 3 packages (no changes) [2.00ms]
It has a warning but overall installs successfully.
Now run bun install
, without the --production
flag:
~/Desktop/reproo
❯ bun install
bun install v1.0.32 (7c9f0763)
4 | "lodash": "4.17.21"
^
warn: Duplicate dependency: "lodash" specified in package.json
at /Users/jarred/Desktop/reproo/package.json:4:5
7 | "lodash": "^4.17.21"
^
note: "lodash" originally specified here
at /Users/jarred/Desktop/reproo/package.json:7:15
error: lodash@4.17.21 failed to resolve
error: underscore@1.9.1 failed to resolve
It reports that devDependencies
failed to resolve.
Part of the problem is when --production
is in use, we should never save the lockfile to disk.
from bun.
@Leni-Vienne are you using bun install --production
?
from bun.
Yes i am indeed, but not sure yet if it's strictly necessary for the error to occur. Take a look at my repo above your last comment, it might help
from bun.
Related Issues (20)
- Workers sometimes don't ref the event loop.
- Version 1.0.32 broke Eslint setup HOT 12
- Labeler tool: layout shift showing steps
- "incorrect alignment" leads to crash HOT 3
- function createBrotliDecompress is present when Brotli isn't supported HOT 2
- `bun install` on macos creates a cache named `~` in the current directory HOT 3
- bun test --watch --only has unexpected behavior HOT 1
- Attempting to install prisma results in a incorrect alignment error
- bunx Error: Cannot find module HOT 2
- Investigate dumping invalid unicode in bunshell.test
- Add CPU usage test for `bun install` when waiting for lifecycle scripts that do nothing
- bun install failed on `>=v1.0.32` while success on `v1.0.31` HOT 4
- Why can't import some packages from npm? HOT 1
- [WebSocket] chrome-remote-interface working in Node, but not Bun
- Improve error message when using non-`file:` URLs in `Bun.file` HOT 1
- No result when running prisma generate with bun HOT 1
- Shell pipe regression HOT 1
- musl build HOT 1
- Slim Docker images without all locales HOT 2
- Intermittent Errors with `Bun.build` and `Bun.FileSystemRouter` when importing absolute paths
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bun.