#Why Bun always import "file:" in package.json?

1 messages · Page 1 of 1 (latest)

slim tartan
#

Hi,

This might be a noob question, but why does Bun always add an import with my project name pointing to "file:" in package.json?

Something like this:

{
  "name": "test-bun",
  ...
  "dependencies": {
    "test-bun": "file:"
  }
}

This causes errors when I try to add new dependencies. For example, when I try to add React to a new project:

# bun add react
EPERM: failed copying files from cache to destination for package test-bun

Even if I remove this import using bun rm test-bun, it comes back when I reopen my project in VS Code.

Is this a misconfiguration in my setup, or is it a Bun requirement?

frozen socket
#

ah, this is caused by a vscode extension. it's a bug in the extension.

#

someone opened an issue about this a while ago, trying to find it