Open erikkrieg opened 1 year ago
Also hitting this.
We have this in our root package.json
under "devDependencies"
:
"eslint-plugin-stainless": "link:./lib/eslint-plugin-stainless",
and the contents of ./lib/eslint-plugin-stainless/package.json
is as follows:
{
"name": "eslint-plugin-stainless",
"version": "1.0.0",
"main": "./index.js"
}
here's what I run and see:
[11:57:03] [~/code/stainless] [main]
➜ cd lib/eslint-plugin-stainless
[11:57:06] [~/code/stainless/lib/eslint-plugin-stainless] [main]
➜ bun link
bun link v1.0.0 (822a00c4)
Success! Registered "eslint-plugin-stainless"
To use eslint-plugin-stainless in a project, run:
bun link eslint-plugin-stainless
Or add it in dependencies in your package.json file:
"eslint-plugin-stainless": "link:eslint-plugin-stainless"
[11:57:11] [~/code/stainless/lib/eslint-plugin-stainless] [main]
➜ cd -
~/code/stainless
[11:57:25] [~/code/stainless] [main]
➜ bun link eslint-plugin-stainless
bun link v1.0.0 (822a00c4)
installed eslint-plugin-stainless@link:eslint-plugin-stainless
patch-package 8.0.0
Applying patches...
yaml-diff-patch@2.0.0 ✔
6 packages installed [3.31s]
[11:57:36] [~/code/stainless] [main]
➜ bun install
bun install v1.0.0 (822a00c4)
error: package "eslint-plugin-stainless" is not linked
To install a linked package:
bun link my-pkg-name-from-package-json
Tip: the package name is from package.json, which can differ from the folder name.
I have the same issue, not sure how to fix this
Same issue
package.json
"dependencies": {
"@sketch/shared-types": "link:./src/shared_types",
same here :)
"eslint-plugin-lenus-mobile-custom-rules": "link:./packages/mobile-eslint-rules",
Seeing the same issue here. I've tried using bun link <package-name>
in the app directory and adding <package-name>: link:<package-name>
to package.json
. Neither seems to work.
Hey, also facing this issue, the bun link
says it has linked the package but then after a bun install
it says that it's not linked. 😭
I experience same issue but weirdly it works on one my repos but not the second one. I linked a lib called damageCalc in repo A later that week i linked it in repo B as well. It works on Repo A but not Repo B
Edit: Library is TS, Repo A is JS and Repo B is TS. So when i convert the files into JS on Repo B they "magically" work. Then I thought it might be my error and tested on my other computer. It links correct on my linux computer and typing definitions resolve as well. The machine with error is an M1 Mac.
The fix for me was putting the new "file:" prefix instead of "link:" in package.json for the linked dependencies. Found here
I confirm the same issue. I also tried mentioned suggestions above but none of them worked for me.
I've been running into the same issue, using "@org/dep": "workspace:*"
fixes it for me. I'm not clear if that's the same as linking though. Taken from here.
For me I had
muslim@uwi:~/Documents/projects/wildlife-fe$ bun install
bun install v1.1.26 (0a37423b)
error: Package "wildlife-fe" is not linked
To install a linked package:
bun link my-pkg-name-from-package-json
Tip: the package name is from package.json, which can differ from the folder name.
error: wildlife-fe@link: failed to resolve
What I did was to remove the package from package.json
and bun install
and it worked
What version of Bun is running?
1.0.0+822a00c4d508b54f650933a73ca5f4a3af9a7983
What platform is your computer?
Darwin 22.6.0 arm64 arm
What steps can reproduce the bug?
cd ./link/this/package
bun link @custom-scope/package
(this matches name in package.json)ls node_modules/@custom-scope
and seepackage
is therebun install
fails witherror: package "@custom-scope/package" is not linked
What is the expected behavior?
Ideally I shouldn't have to manually run the link command at all since the path to the linked directory is in the root package.json and then in either case the install should not fail claiming the link does not exist when it actually does.
What do you see instead?
I see the symlink in node_modules, but the install command always fails.
Additional information
I installed the bun binary using Nix package manager. I don't think this is likely to matter, since it is just copying the built binary from Bun's GitHub releases, but just to be thorough I'm mentioning it.
Another thing, the custom scope being used for the linked module is the same as a scope that points to a private registry. So I'm wondering if there could be an unexpected dynamic involving this.