Skip to content

0.30.1 causing node-gyp build errors #362

@jsjoeio

Description

@jsjoeio

Steps to reproduce

  1. git checkout https://github.com/coder/code-server
  2. Follow steps to build and create standalone release with yarn release:standalone

Expected behaviour

It should build

Actual behaviour

Results in this error:

npm ERR! code 1
npm ERR! path /Users/jp/dev/coder/code-server/release-standalone/node_modules/argon2
npm ERR! command failed
npm ERR! command sh /var/folders/c7/ns6lqzvx3z10mq647y5g9lqc0000gn/T/install-4ac3e147.sh
npm ERR! make: Entering directory '/Users/jp/dev/coder/code-server/release-standalone/node_modules/argon2/build'
npm ERR!   CC(target) Release/obj.target/libargon2/argon2/src/opt.o
npm ERR!   CC(target) Release/obj.target/libargon2/argon2/src/argon2.o
npm ERR!   CC(target) Release/obj.target/libargon2/argon2/src/core.o
npm ERR!   CC(target) Release/obj.target/libargon2/argon2/src/blake2/blake2b.o
npm ERR!   CC(target) Release/obj.target/libargon2/argon2/src/thread.o
npm ERR!   CC(target) Release/obj.target/libargon2/argon2/src/encoding.o
npm ERR!   LIBTOOL-STATIC Release/argon2.a
npm ERR!   SOLINK_MODULE(target) Release/argon2.node
npm ERR! make: Leaving directory '/Users/jp/dev/coder/code-server/release-standalone/node_modules/argon2/build'
npm ERR! Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/jp/dev/coder/code-server/release-standalone/node_modules/argon2/lib/binding/napi-v3/argon2.node --module_name=argon2 --module_path=/Users/jp/dev/coder/code-server/release-standalone/node_modules/argon2/lib/binding/napi-v3 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | darwin | x64
npm ERR! node-pre-gyp info build requesting source compile
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | x64
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | x64
npm ERR! gyp info find Python using Python version 3.7.9 found at "/usr/local/bin/python3"
npm ERR! gyp info spawn /usr/local/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/jp/dev/coder/code-server/release-standalone/node_modules/argon2/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/jp/Library/Caches/node-gyp/16.17.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/jp/Library/Caches/node-gyp/16.17.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/jp/Library/Caches/node-gyp/16.17.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/jp/dev/coder/code-server/release-standalone/node_modules/argon2',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | x64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! clang: error: no such file or directory: 'Release/obj.target/argon2/argon2.o'
npm ERR! make: *** [argon2.target.mk:183: Release/argon2.node] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 20.6.0
npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/jp/dev/coder/code-server/release-standalone/node_modules/argon2/lib/binding/napi-v3/argon2.node" "--module_name=argon2" "--module_path=/Users/jp/dev/coder/code-server/release-standalone/node_modules/argon2/lib/binding/napi-v3" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
npm ERR! gyp ERR! cwd /Users/jp/dev/coder/code-server/release-standalone/node_modules/argon2
npm ERR! gyp ERR! node -v v16.17.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok 
npm ERR! node-pre-gyp ERR! build error 
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/jp/dev/coder/code-server/release-standalone/node_modules/argon2/lib/binding/napi-v3/argon2.node --module_name=argon2 --module_path=/Users/jp/dev/coder/code-server/release-standalone/node_modules/argon2/lib/binding/napi-v3 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/jp/dev/coder/code-server/release-standalone/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1093:16)
npm ERR! node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Darwin 20.6.0
npm ERR! node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/jp/dev/coder/code-server/release-standalone/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /Users/jp/dev/coder/code-server/release-standalone/node_modules/argon2
npm ERR! node-pre-gyp ERR! node -v v16.17.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.10
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/jp/.npm/_logs/2022-10-25T16_04_17_332Z-debug-0.log
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

See in CI: https://github.com/coder/code-server/actions/runs/3317058972/jobs/5479516380

Reproduced locally on macOS.

Environment

Operating system:
macOS Big Sur 11.7

Node version:
v16.17.0

Compiler version:

Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-1300.0.29.30)
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Workaround

Downgrading to 0.29.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions