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

Package fails to build on install using yarn berry on windows #2

Open
FC5570 opened this issue Nov 17, 2023 · 1 comment
Open

Package fails to build on install using yarn berry on windows #2

FC5570 opened this issue Nov 17, 2023 · 1 comment

Comments

@FC5570
Copy link

FC5570 commented Nov 17, 2023

I'm not sure whether this is a yarn issue or something related to this package. But building on windows always fails using yarn berry (v4.0.2, v4.0.1, v3.7.0 all tried) using node v20.9.0. However, this does work on legacy versions (v1, tested on v1.22.21).

This issue only occurs on windows and using yarn berry only (npm works fine). Build on linux (debian 10) works fine with yarn stable (v4.0.2).

image

This is the build log:

# This file contains the result of Yarn building a package (pqclean@npm:0.3.1)
# Script name: install

Generated sources exist. To regenerate, please use "npm run regenerate-native".
node:internal/errors:497
    ErrorCaptureStackTrace(err);
    ^

Error: spawn C:\Users\redacted\AppData\Local\Temp\xfs-1546c3d2\node ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawn C:\\Users\\redacted\\AppData\\Local\\Temp\\xfs-1546c3d2\\node',
  path: 'C:\\Users\\redacted\\AppData\\Local\\Temp\\xfs-1546c3d2\\node',
  spawnargs: [
    'C:\\Users\\redacted\\AppData\\Local\\Temp\\xfs-1546c3d2\\yarn',
    'run',
    'build-native'
  ]
}

I've tried running this as admin too.

@tniessen Can you look into this please. Thank you.

@tniessen
Copy link
Owner

@FC5570 Thank you for reporting this. It seems that Yarn 4.0.2 sets npm_node_execpath to the path of a temporary #!/bin/sh wrapper for node, and npm_execpath to the path of a temporary #!/bin/sh wrapper for yarn. That breaks install.mjs: npm_node_execpath is not an executable file on Windows, and npm_execpath is not a JavaScript file.

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

No branches or pull requests

2 participants