Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error unable to add the file (filename) because another file (filename) is going to be written #1734

Closed
davidfirst opened this issue Jun 13, 2019 · 0 comments · Fixed by teambit/bit-javascript#105

Comments

@davidfirst
Copy link
Member

Describe the bug

A user from Gitter encountered this issue when importing a component. Bit throws the error above.

Steps to Reproduce

  1. create a file 'src/index.js'.
  2. create another file 'src/bar/foo.js' with the content require('..');.
  3. bit add src
  4. edit bit.json file and add "resolveModules": { "modulesDirectories": ["src"] }
  5. tag, export, and import to another workspace.

the following error is thrown

unable to add the file "components/src", because another file "components/src/package.json" is going to be written.
one of them is a directory of the other one, and is not possible to have them both

Expected Behavior

Should import with no errors

Specifications

  • Bit version: 14.1.3
  • Node version:
  • npm / yarn version:
  • Platform:
  • Bit compiler (include version):
  • Bit tester (include version):
davidfirst added a commit that referenced this issue Jun 13, 2019
davidfirst added a commit to teambit/bit-javascript that referenced this issue Jun 13, 2019
…hs, also, avoid assuming that custom-resolve was used only based on the relative-path and the existence of the config. instead, explicitly mark custom-resolved as such.
davidfirst added a commit to teambit/bit-javascript that referenced this issue Jun 14, 2019
…tom-resolved used (#105)

* fix teambit/bit#1734, recognize "." and ".." partials as relative paths

*  avoid assuming that custom-resolve was used only based on the relative-path and the existence of the config. instead, explicitly mark custom-resolved as such.

* bump version
davidfirst added a commit that referenced this issue Jun 14, 2019
…odule-resolved incorrectly (#1735)

* fix #1734 from bit-javascript, avoid identify "." or ".." as custom-module-resolved incorrectly

* generate links correctly for components that have the invalid custom-resolve saved

* bump version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant