Open ghost opened 1 year ago
Using Yarn 3, I get a slightly different error that I believe has the same root cause:
➤ YN0007: │ deasync@npm:0.1.28 must be built because it never has b
een before or the last one failed
➤ YN0009: │ deasync@npm:0.1.28 couldn't be built successfully (ex
it code 1, logs can be found here: /private/var/folders/8c/xcgdny9557xd0w8bc7ndb6x80000gp/T/xfs-6376766d/build.log)
➤ YN0000: └ Completed in 2s 672ms
➤ YN0000: Failed with errors in 35s 200ms
$HOME/.npm/_npx/ea7c6e7510ea3309/node_modules/sao/lib/installPackages.js:108
throw new SAOError(`Failed to install ${packageName} in ${cwd}`)
^
SAOError: Failed to install packages in $HOME/project_dir
at ChildProcess.<anonymous> ($HOME/.npm/_npx/ea7c6e7510ea3309/node_modules/sao/lib/installPackages.js:108:15)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1100:16)
at Socket.<anonymous> (node:internal/child_process:458:11)
at Socket.emit (node:events:513:28)
at Pipe.<anonymous> (node:net:301:12) {
__sao: true
}
Subsequent yarn install
commands result in:
➤ YN0007: │ deasync@npm:0.1.28 must be built because it never has been before or the last one failed
➤ YN0009: │ deasync@npm:0.1.28 couldn't be built successfully (exit code 1, logs can be found here: /private/var/folders/8c/xcgdny9557xd0w8bc7ndb6x80000gp/T/xfs-39774a13/build.log)
➤ YN0000: └ Completed in 1s 89ms
➤ YN0000: Failed with errors in 1s 667ms
The error log contains:
# This file contains the result of Yarn building a package (deasync@npm:0.1.28)
# Script name: install
[31m[1mUsage Error[22m[39m: Couldn't find a script name "node-gyp" in the top-level (used by deasync@npm:0.1.28). This typically happens because some package depends on "node-gyp" to build itself, but didn't list it in their dependencies. To fix that, please run "yarn add node-gyp" into your top-level workspace. You also can open an issue on the repository of the specified package to suggest them to use an optional peer dependency.
[1m$ [22myarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] <scriptName> ...
Build failed
This is also referenced in #155. Running yarn add node-gyp
fixed it for me, but obviously not an ideal solution.
Experiencing the same issues. Any updates on this? @abbr
it seems like it happens on node v20. reverting to use node v18 makes it work
See this for a solution and workaround:
After switching to an M1 Mac I get the following error.
I tried adding a resolution to version 0.1.28 in my package.json which did not help.