Skip to content

Bug: ENOENT No such file or directory when installing with Yarn 1.0.1 on Windows #117

@sampsonjoliver

Description

@sampsonjoliver

Had this issue when installing canned with yarn 1.0.1 on Windows. I raised an issue over on Yarn and the issue was closed as being to fault with the canned package name.

What is the current behavior?
error An unexpected error occurred: "https://registry.yarnpkg.com/canned/-/canned-0.3.9.tgz: ENOENT: no such file or directory, open 'C:\Users\samjo\AppData\Local\Yarn\cache\v1\npm-canned-0.3.9-b0bfdeffdc595dd5c0055730b808d5c26b4caa02\spec\test_responses\_a?name=Batman&age=30.get.html'".

Steps to reproduce.
Running yarn add or in fact any yarn invocation after adding "canned": "^0.3.10" as a dev dependency to my package.json results in the error. Amending to use other versions of canned, e.g. 0.3.9 produce the same error.

Cause

this is noy Yarn's fault but a problem with the package itself. That file has ? in its name and that character is not allowed in file or folder names on Windows: https://support.microsoft.com/en-us/help/905231/information-about-the-characters-that-you-cannot-use-in-site-names--fo

All of this cited from the issue raised on the yarn github:
yarnpkg/yarn#4427

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions