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

IO error while extracting - Cannot create junctions on Windows #267

Open
kleinesfilmroellchen opened this issue May 17, 2023 · 6 comments
Open
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@kleinesfilmroellchen
Copy link

When running oro apply on a directory that has an up-to-date package lock and node_modules, oro errors out with an I/O error after resolving all packages. Additionally, early on, the log complains about a missing package name for the main package itself.

   0.000027700s DEBUG Running command: oro.exe apply
   0.551022700s DEBUG resolving: Failed to parse existing package-lock.json: Missing package name:
NpmPackageLockEntry {
    name: None,
    version: None,
    resolved: None,
    integrity: None,
    dependencies: {
        "esbuild": "^0.14.47",
        "esbuild-sass-plugin": "^2.2.6",
        "eslint": "^8.17.0",
        "eslint-config-prettier": "^8",
        "eslint-plugin-import": "^2",
        "npm": "^8.12.1",
    },
    dev_dependencies: {
        "@typescript-eslint/eslint-plugin": "^5.59.0",
        "@typescript-eslint/parser": "^5.59.0",
        "typescript": "^5.0.4",
    },
    optional_dependencies: {},
    peer_dependencies: {},
}
   6.750180100s  WARN resolving: �[45mdeprecated�[0m @npmcli/[email protected]: "this package has been deprecated, use `ci-info` instead"
   7.156594400s  WARN resolving: �[45mdeprecated�[0m [email protected]: "This functionality has been moved to @npmcli/fs"
   7.734805700s  WARN resolving: �[45mdeprecated�[0m @npmcli/[email protected]: "This functionality has been moved to @npmcli/fs"
  19.683945200s DEBUG resolving: Resolved graph of 469 nodes in 19132ms
  19.684340200s  INFO 🔍 Resolved 469 packages in 19.683s.
  33.630518300s DEBUG prune: No metadata file found in node_modules/. Pruned entire node_modules/ directory in 13946ms.
  33.630906400s  INFO 🧹 Pruned 0 packages in 13.946s.
  33.630982200s DEBUG extract: Applying node_modules/...
  33.659077300s DEBUG extract: reflink support check failed. Files will be hard linked or copied. (Unzulässige Funktion. (os error 1))
  33.687825600s DEBUG �]8;;https://docs.rs/node-maintainer/0.3.25/node_maintainer/enum.NodeMaintainerError.html#variant.IoError�\�[31mnode_maintainer::io_error �[0m�[36;1;4m(link)�[0m�]8;;�\

  �[31m×�[0m Unzulässige Funktion. (os error 1)

As far as I can tell, this is not a failure condition for either yarn or npm.

@zkat zkat added the bug Something isn't working label May 19, 2023
@zkat zkat closed this as completed in 3ffa42f May 19, 2023
zkat added a commit that referenced this issue May 19, 2023
@zkat zkat reopened this May 19, 2023
@zkat zkat changed the title "Failed to parse existing package-lock.json: Missing package name" IO error while extracting May 19, 2023
@zkat
Copy link
Member

zkat commented May 19, 2023

oh oops, I only fixed the package-lock.json thing.

Frustratingly enough, this is related to #249, which would actually help give the debug information I'd need in order to further debug this. I'll look into doing this soon and maybe you can try again?

@zkat zkat self-assigned this May 19, 2023
@zkat
Copy link
Member

zkat commented May 19, 2023

@kleinesfilmroellchen I just released [email protected], which should have all the extra debugging info I need. Would try try it out again and let me know what it says now? I should be able to track it down now.

@kleinesfilmroellchen
Copy link
Author

@zkat Fantastic! I think you have a Window-specific error on your hands here:

   0.000063400s DEBUG Running command: oro.exe apply
   1.046899100s  WARN resolving: �[45mdeprecated�[0m @npmcli/[email protected]: "This functionality has been moved to @npmcli/fs"
   1.109847000s  WARN resolving: �[45mdeprecated�[0m [email protected]: "This functionality has been moved to @npmcli/fs"
   1.391483200s  WARN resolving: �[45mdeprecated�[0m @npmcli/[email protected]: "This functionality has been moved to @npmcli/fs"
   2.381779200s  WARN resolving: �[45mdeprecated�[0m @npmcli/[email protected]: "this package has been deprecated, use `ci-info` instead"
   3.236788000s DEBUG resolving: Resolved graph of 541 nodes in 3232ms
   3.237575100s  INFO 🔍 Resolved 541 packages in 3.236s.
   3.238303700s DEBUG prune: No metadata file found in node_modules/. Pruned entire node_modules/ directory in 0ms.
   3.238557700s  INFO 🧹 Pruned 0 packages in 0s.
   3.238616300s DEBUG extract: Applying node_modules/...
   3.817817400s DEBUG extract: reflink support check failed. Files will be hard linked or copied. (Unzulässige Funktion. (os error 1))
   3.838142300s DEBUG �]8;;https://docs.rs/node-maintainer/0.3.26/node_maintainer/enum.NodeMaintainerError.html#variant.IoError�\�[31mnode_maintainer::io_error �[0m�[36;1;4m(link)�[0m�]8;;�\

  �[31m�[0m Failed to create symlink or juncion for dependency, from $CURRENT_DIRECTORY\node_modules\.oro-
  �[31m│�[0m store\typescript@969545dd\node_modules\typescript to $CURRENT_DIRECTORY\node_modules\typescript.
�[31m  ╰─▶ �[0mUnzulässige Funktion. (os error 1)

   3.838698000s  WARN A debug log was written to blahblah\orogene\cache\_logs\oro-debug-2023-05-19-22-50-50.757-0.log

@kleinesfilmroellchen kleinesfilmroellchen changed the title IO error while extracting IO error while extracting - Cannot create symlink on Windows May 19, 2023
@zkat
Copy link
Member

zkat commented May 19, 2023

Oh interesting.

This is actually the junction creation that's failing! I guess I haven't been running into it myself because my Windows user is able to create symlinks, so it never tries to fall back. I could've sworn I tested this, though

What version of Windows are you on? And is this an NTFS file system?

@zkat zkat changed the title IO error while extracting - Cannot create symlink on Windows IO error while extracting - Cannot create junctions on Windows May 20, 2023
zkat added a commit that referenced this issue May 20, 2023
zkat added a commit that referenced this issue May 20, 2023
@kleinesfilmroellchen
Copy link
Author

What version of Windows are you on? And is this an NTFS file system?

Windows 10 Home Version 22H2 Build 19045.3030, Windows Feature Experience Pack 1000.19041.1000.0. Yes, this is on an unencrypted NTFS file system; no WSL involved.

@zkat
Copy link
Member

zkat commented May 20, 2023

dang. I don't know why I can't reproduce this yet :(

For now, I've created #270 to add a more detailed error message that suggests switching to the hoisted linker, which won't have this problem. Will this at least unblock you? I'm honestly at a loss, because junctions should work on your platform (and they work for me, too!), but your Windows is pretending they're not available at all? I wonder if this is a policies thing of some sort, although I'd expect a permissions error if it were, not an "Invalid function" error...

@zkat zkat added the help wanted Extra attention is needed label May 20, 2023
zkat added a commit that referenced this issue May 21, 2023
@zkat zkat removed their assignment Jul 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
Status: In Progress
Development

No branches or pull requests

2 participants