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

Building 3.0.0-rc.4 fails using cached node modules (ENOENT ppx-macos-arm64) #502

Closed
Zeta611 opened this issue Apr 9, 2024 · 2 comments
Closed

Comments

@Zeta611
Copy link

Zeta611 commented Apr 9, 2024

Hello, I've been using the 3.0.0-rc.4 with joy, but there is a minor issue.
When building 3.0.0-rc.4 with cached node modules, it fails while trying to remove /opt/build/repo/node_modules/rescript-relay/ppx-macos-arm64 which is non-existent.
I'm using automatic deploy on Netlify, and I need to manually reset cache and retry.

Here is the relevant part of the log:

9:24:27 PM: ➤ YN0000: · Yarn 4.1.1
9:24:27 PM: ➤ YN0000: ┌ Resolution step
9:24:27 PM: ➤ YN0000: └ Completed
9:24:27 PM: ➤ YN0000: ┌ Fetch step
9:24:29 PM: ➤ YN0013: │ 2 packages were added to the project, and 3 were removed (+ 128.54 KiB).
9:24:29 PM: ➤ YN0000: └ Completed in 1s 332ms
9:24:29 PM: ➤ YN0000: ┌ Link step
9:24:30 PM: ➤ YN0007: │ rescript@npm:11.0.1 must be built because it never has been before or the last one failed
9:24:30 PM: ➤ YN0007: │ protobufjs@npm:6.11.4 must be built because it never has been before or the last one failed
9:24:30 PM: ➤ YN0007: │ esbuild@npm:0.20.2 must be built because it never has been before or the last one failed
9:24:30 PM: ➤ YN0007: │ core-js@npm:3.36.1 must be built because it never has been before or the last one failed
9:24:30 PM: ➤ YN0007: │ protobufjs@npm:7.2.6 must be built because it never has been before or the last one failed
9:24:30 PM: ➤ YN0000: │ rescript@npm:11.0.1 STDOUT ReScript 11.0.1 (ninja 1.9.0.git)
9:24:30 PM: ➤ YN0007: │ rescript-relay@npm:3.0.0-rc.4 [01fb9] must be built because it never has been before or the last one failed
9:24:30 PM: ➤ YN0000: │ rescript-relay@npm:3.0.0-rc.4 [01fb9] STDERR node:fs:1874
9:24:30 PM: ➤ YN0000: │ rescript-relay@npm:3.0.0-rc.4 [01fb9] STDERR   binding.unlink(path);
9:24:30 PM: ➤ YN0000: │ rescript-relay@npm:3.0.0-rc.4 [01fb9] STDERR           ^
9:24:30 PM: ➤ YN0000: │ rescript-relay@npm:3.0.0-rc.4 [01fb9] STDERR
9:24:30 PM: ➤ YN0000: │ rescript-relay@npm:3.0.0-rc.4 [01fb9] STDERR Error: ENOENT: no such file or directory, unlink "/opt/build/repo/node_modules/rescript-relay/ppx-macos-arm64"
9:24:30 PM: ➤ YN0000: │ rescript-relay@npm:3.0.0-rc.4 [01fb9] STDERR     at Object.unlinkSync (node:fs:1874:11)
9:24:30 PM: ➤ YN0000: │ rescript-relay@npm:3.0.0-rc.4 [01fb9] STDERR     at removeInitialBinaries (/opt/build/repo/node_modules/rescript-relay/postinstall.js:132:6)
9:24:30 PM: ➤ YN0000: │ rescript-relay@npm:3.0.0-rc.4 [01fb9] STDERR     at Object.<anonymous> (/opt/build/repo/node_modules/rescript-relay/postinstall.js:183:1)
9:24:30 PM: ➤ YN0000: │ rescript-relay@npm:3.0.0-rc.4 [01fb9] STDERR     at Module._compile (node:internal/modules/cjs/loader:1369:14)
9:24:30 PM: ➤ YN0000: │ rescript-relay@npm:3.0.0-rc.4 [01fb9] STDERR     at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
9:24:30 PM: ➤ YN0000: │ rescript-relay@npm:3.0.0-rc.4 [01fb9] STDERR     at Module.load (node:internal/modules/cjs/loader:1206:32)
9:24:30 PM: ➤ YN0000: │ rescript-relay@npm:3.0.0-rc.4 [01fb9] STDERR     at Module._load (node:internal/modules/cjs/loader:1022:12)
9:24:30 PM: ➤ YN0000: │ rescript-relay@npm:3.0.0-rc.4 [01fb9] STDERR     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
9:24:30 PM: ➤ YN0000: │ rescript-relay@npm:3.0.0-rc.4 [01fb9] STDERR     at node:internal/main/run_main_module:28:49 {
9:24:30 PM: ➤ YN0000: │ rescript-relay@npm:3.0.0-rc.4 [01fb9] STDERR   errno: -2,
9:24:30 PM: ➤ YN0000: │ rescript-relay@npm:3.0.0-rc.4 [01fb9] STDERR   code: "ENOENT",
9:24:30 PM: ➤ YN0000: │ rescript-relay@npm:3.0.0-rc.4 [01fb9] STDERR   syscall: "unlink",
9:24:30 PM: ➤ YN0000: │ rescript-relay@npm:3.0.0-rc.4 [01fb9] STDERR   path: "/opt/build/repo/node_modules/rescript-relay/ppx-macos-arm64"
9:24:30 PM: ➤ YN0000: │ rescript-relay@npm:3.0.0-rc.4 [01fb9] STDERR }
9:24:30 PM: ➤ YN0000: │ rescript-relay@npm:3.0.0-rc.4 [01fb9] STDERR
9:24:30 PM: ➤ YN0000: │ rescript-relay@npm:3.0.0-rc.4 [01fb9] STDERR Node.js v20.12.1
9:24:30 PM: ➤ YN0009: │ rescript-relay@npm:3.0.0-rc.4 [01fb9] couldn"t be built successfully (exit code 1, logs can be found here: /tmp/xfs-337d0230/build.log)
➤ YN0000: └ Completed in 1s 823ms
9:24:30 PM: ➤ YN0000: · Failed with errors in 3s 305ms
9:24:30 PM: Error during Yarn install
9:24:30 PM: Failing build: Failed to install dependencies
9:24:31 PM: Failed during stage "Install dependencies": dependency_installation script returned non-zero exit code: 1

Thank you for developing this amazing package!

@zth
Copy link
Owner

zth commented Apr 9, 2024

Hi! Thank you for the kind words! This will be fixed in the next release (thanks to @tsnobip ): d04115a

@Zeta611
Copy link
Author

Zeta611 commented Apr 9, 2024

That's good to hear!
I'll close the issue as this will be fixed in the next release.

  • I just discovered that using Bun instead of Yarn, makes the issues go away, which is kind of unexpected.

@Zeta611 Zeta611 closed this as completed Apr 9, 2024
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