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

tfx extension create causes "error: Error: EISDIR: illegal operation on a directory, read". #265

Open
Vossekop opened this issue Mar 24, 2018 · 4 comments · May be fixed by #457
Open

tfx extension create causes "error: Error: EISDIR: illegal operation on a directory, read". #265

Vossekop opened this issue Mar 24, 2018 · 4 comments · May be fixed by #457

Comments

@Vossekop
Copy link

I am creating an extension for our company containing multiple build/release tasks. They have some shared code which I wanted to make available to my co-workers as an NPM package as well as use in my own tasks.

I therefor created a folder next to my task folders containing the shared code and configured it as a stand alone NPM package. I then linked it to my tasks by using the "npm link" statement. This creates a symbolic link (as I understand) in the node_modules folder to the actual package location on my hard drive.

When running the 'tfx extension create' or 'tfx extension publish' commands the error from the issue title appears. In my understanding this is caused by the symbolic link which tfx can't traverse when building the package.

As a work-around I decided to not use a linked npm package but just reference the files directly and include them all in the extension. However, since the common code is outside the root of each of the tasks, the tasks fail when run after publish.

I feel the first issue should be addressed, but I understand that this might not happen overnight. So any help with a fix for my workaround (or any guidance of reusing code between multiple different tasks) you folks could point me to would be much appreciated

Kind regards,

Jeroen Vos

@Vossekop Vossekop changed the title "error: Error: EISDIR: illegal operation on a directory, read" when local linked npm package is used by build task. tfx extension create causes "error: Error: EISDIR: illegal operation on a directory, read". Mar 24, 2018
@sabbour
Copy link
Member

sabbour commented Jul 21, 2018

I succeeded in working around this by packing the dependency module using npm pack and referring to the released tgz file in the dependencies:

  "dependencies": {
    "common-gitops": "file:../../lib/common-gitops/common-gitops-0.1.0.tgz"
  }

@dtzar
Copy link
Member

dtzar commented Jul 18, 2019

We're hitting this bug/limitation with the Azure ML AzDO task as well and have to do the workaround mentioned.

@tiulpin
Copy link

tiulpin commented Feb 12, 2022

This also helps (making hard copies of all links inside node_modules):

rsync --archive --verbose --copy-links ./node_modules/ ./node_modules_cp/ && rm -r ./node_modules/ && mv ./node_modules_cp/ ./node_modules/

@winstliu winstliu linked a pull request May 26, 2024 that will close this issue
@marcopelegrini
Copy link

Same issue here, very annoying

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants