deasync
deasync copied to clipboard
yarn install fails
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.
elias@localhost frontend % ./yarn install
yarn install v1.22.19
[1/4] 🔍 Resolving packages...
warning Resolution field "[email protected]" is incompatible with requested version "fsevents@^1.2.7"
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning "nuxt > @nuxt/[email protected]" has unmet peer dependency "consola@*".
warning "nuxt-property-decorator > [email protected]" has unmet peer dependency "vuex@^3.0.0".
warning "nuxt-property-decorator > [email protected]" has unmet peer dependency "vuex@>=3".
warning " > @babel/[email protected]" has unmet peer dependency "@babel/core@>=7.11.0".
warning "@nuxtjs/eslint-config-typescript > [email protected]" has unmet peer dependency "eslint-plugin-import@*".
warning "@nuxtjs/eslint-config-typescript > @nuxtjs/eslint-config > [email protected]" has incorrect peer dependency "eslint@^7.12.1".
warning "@nuxtjs/eslint-config-typescript > @nuxtjs/eslint-config > [email protected]" has incorrect peer dependency "eslint@^7.0.0".
warning "@nuxtjs/eslint-config-typescript > @typescript-eslint/eslint-plugin > [email protected]" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
warning " > [email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning " > [email protected]" has unmet peer dependency "@babel/core@^7.8.0".
warning "babel-jest > [email protected]" has unmet peer dependency "@babel/core@^7.0.0".
warning "babel-jest > babel-preset-jest > [email protected]" has unmet peer dependency "@babel/core@^7.0.0".
warning "babel-jest > babel-preset-jest > babel-preset-current-node-syntax > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "babel-jest > babel-preset-jest > babel-preset-current-node-syntax > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning " > [email protected]" has unmet peer dependency "typescript@>=3.8 <5.0".
warning " > [email protected]" has unmet peer dependency "@types/node@*".
warning " > [email protected]" has unmet peer dependency "typescript@>=2.7".
[4/4] 🔨 Building fresh packages...
[1/6] ⠁ core-js
[2/6] ⠁ core-js
[3/6] ⠁ vuex-module-decorators
[4/6] ⠁ deasync
error /Users/elias/Repositories/simons-ads/frontend/node_modules/deasync: Command failed.
Exit code: 1
Command: node ./build.js
Arguments:
Directory: /Users/elias/Repositories/simons-ads/frontend/node_modules/deasync
Output:
node:events:491
throw er; // Unhandled 'error' event
^
Error: spawn node-gyp ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:476:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
at ChildProcess._handle.onexit (node:internal/child_process:289:12)
at onErrorNT (node:internal/child_process:476:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn node-gyp',
path: 'node-gyp',
spawnargs: [ 'rebuild' ]
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:
- https://github.com/abbr/deasync/issues/181