Do you want to request a feature or report a bug?
Report a bug
What is the current behavior?
When adding a remote tarball package an error occurs:
error An unexpected error occurred: "https://github.com/blikblum/cherrytree/releases/download/svelte-2.4.2/build.tar.gz: EISDIR: illegal operation on a directory, open '/home/luiz/.cac
he/yarn/v1/.tmp/9417ab587e459fe380a7e913f4160254/'".
If the current behavior is a bug, please provide the steps to reproduce.
In an empty folder:
yarn init
// create a dummy project
yarn add https://github.com/blikblum/cherrytree/releases/download/svelte-2.4.2/build.tar.gz
Manually updating dependencies in package.json like
dependencies: {
"cherrytree": "https://github.com/blikblum/cherrytree/releases/download/svelte-2.4.2/build.tar.gz"
}
and doing yarn install
the error also occurs
What is the expected behavior?
Package from link https://github.com/blikblum/cherrytree/releases/download/svelte-2.4.2/build.tar.gz
should be installed and added to dependencies
Please mention your node.js, yarn and operating system version.
Yarn 0.23.2
Node 6.10
Linux Mint 17.3 and Windows 10
yarn-error.log file:
Arguments:
/usr/bin/nodejs /usr/bin/yarn add https://github.com/blikblum/cherrytree/releases/download/svelte-2.4.2/build.tar.gz
PATH:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
Yarn version:
0.23.2
Node version:
6.10.2
Platform:
linux x64
npm manifest:
{
"name": "testproj",
"version": "1.0.0",
"main": "index.js",
"license": "MIT"
}
yarn manifest:
No manifest
Lockfile:
No lockfile
Trace:
Error: https://github.com/blikblum/cherrytree/releases/download/svelte-2.4.2/build.tar.gz: EISDIR: illegal operation on a directory, open '/usr/local/share/.cache/yarn/v1/.tmp/9417ab587e459fe380a7e913f4160254/'
at Error (native)
Hey, I struggled with this error for a while when I finally managed to find the root cause, at least in my case:
For a .tar.gz
to be used by yarn add
it must have the file names starting with a ./
. I checked your tarball and all files are listed without the leading local directory ref (tar -tf build.tar.gz
).
This can be fixed simply by modifying how you refer to your files when calling tar
command (i.e. passing "./*" instead of "*"). Or if you're creating it programmatically, change the file names in the headers.
Thanks. That worked. Leaving open since at least a note in documentation is in order
Hey guys,
I have added a warning which informs the user of this behavior and suggests the solution.
Created PR #4898 for the same
This is my first contribution to yarn so please let me know if I have missed something. Thanks.
Most helpful comment
Hey, I struggled with this error for a while when I finally managed to find the root cause, at least in my case:
For a
.tar.gz
to be used byyarn add
it must have the file names starting with a./
. I checked your tarball and all files are listed without the leading local directory ref (tar -tf build.tar.gz
).This can be fixed simply by modifying how you refer to your files when calling
tar
command (i.e. passing "./*" instead of "*"). Or if you're creating it programmatically, change the file names in the headers.