Open henriquealbert opened 1 year ago
upupup
This is occurring for me when using local package sources:
"devDependencies": {
"my-package": "file:/Users/larry/Development/oss/my-package"
}
I've confirmed there is a valid package.json in the my-package
directory
Everything works as expected with pnpm
and npm
In my case, I've added 'sudo,' and everything worked after.
I actually ran into a similar issue, but with a docker build, where a package.json file was copied with incorrect user permissions. In mine (and I guess @pgmatheus) instance, the bug is more about providing a proper error message - the file exists but is not accessible for bun.
I ran into a similar issue, linking by file in package. package.json exist in dependency package. npm install works fine.
"dependencies": {
"my-package": "file://Users/path/to/package"
ran into similar issue with Docker and it was a permission error here is how we solved it:
# Dockerfile
COPY --chown=app:app ./package.json ./bun.lockb /home/app/
Running into this with GitHub actions. I'm not using any file://
dependencies.
My issue was that I was using a Git submodule but hadn't set the submodule up in a fresh clone. We should handle this in a cleaner way. If possible, warn users that the package was missing?
Command working after installing latest node js 😁
up, ubuntu, snap install bun-js,package.json has created,npm i is ok
删除不掉,装不上,用不了,哈哈
if you can use sudo perf trace
or strace
and report the output, that would help. Seeing what the system call is returning would tell us where the error is
I had this problem today. It turns out that I had this entry in my "dependencies" : ".", ".". When I removed that entry, bun started to work again. I don't know how that line got there, perhaps bun put it there at some point?
Piling on here, where I'm pointing a dep at "file://" in the package.json I get the "missing package.json" message. No issue with yarn, npm or pnpm.
I fixed this by using bun link instead of the file:/
syntax. That seems to be the bun way to handle local deps.
yep! "bun link" works better than any other solution for me as well
Awesome, thanks!
On Thu, Feb 8, 2024 at 7:52 PM Larry Williamson @.***> wrote:
yep! "bun link" works better than any other solution for me as well
— Reply to this email directly, view it on GitHub https://github.com/oven-sh/bun/issues/5483#issuecomment-1935161855, or unsubscribe https://github.com/notifications/unsubscribe-auth/BA6V6ZWS6P2EYAQ3QGIAYJLYSVXM5AVCNFSM6AAAAAA42C3XKKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZVGE3DCOBVGU . You are receiving this because you commented.Message ID: @.***>
I am trying to install a custom cli and am getting this error when running this command: bun add -g .
with this package.json
:
{
"name": "cslang",
"module": "src/index.ts",
"type": "module",
"scripts": {
"dev": "bun src/index.ts"
},
"devDependencies": {
"@types/bun": "latest"
},
"dependencies": {
"citty": "^0.1.6",
"consola": "^3.2.3"
},
"bin": {
"cslang": "./src/index.ts"
}
}
bun link didn't work for me when linking to a separate package in a monorepo
Same problem here.
ricardo@ricardo:/var/www/html/typebot.io$ bun i error: Bun could not find a package.json file to install from note: Run "bun init" to initialize a project
What version of Bun is running?
1.0.1+31aec4ebe325982fc0ef27498984b0ad9969162b
What platform is your computer?
Darwin 23.0.0 arm64 arm
What steps can reproduce the bug?
Issue while trying to install packages using
bun install
in Meteor buildSteps to reproduce:
What is the expected behavior?
It should simply install the npm dependencies.
What do you see instead?
Additional information
I created a repository and added the steps to reproduce the issue: https://github.com/henriquealbert/bun-meteor-build