-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
playwright does not support FreeBSD as a platform. #4596
Comments
@khng300 do you mind adding more notes to your bug report? Are you trying to contribute to code-server or just use it locally? |
I am trying to run code-servee locally, but seems like the dependency playwright does not like the platform. I saw it being under test/. |
@khng300 hmm... how are you installing and running code-server locally? Can you post repro steps? |
$ git clone https://github.com/cdr/code-server
$ node -v
v14.18.1
$ sed -i '' -e 's/"argon2": ".*"/"argon2": "0.28.2"/g' package.json
$ yarn global add $PWD
yarn global v1.22.17
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "/home/khng/Workspace/code-server > @coder/[email protected]" has unmet peer dependency "@google-cloud/logging@^4.5.2".
[4/4] Building fresh packages...
[3/3] ⠠ code-server
[-/3] ⠠ waiting...
error /home/khng/.config/yarn/global/node_modules/code-server: Command failed.
Exit code: 1
Command: ./ci/dev/postinstall.sh
Arguments:
Directory: /home/khng/.config/yarn/global/node_modules/code-server
Output:
Installing code-server test dependencies...
yarn install v1.22.17
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > [email protected]" has unmet peer dependency "typescript@>=3.8 <5.0".
[4/4] Building fresh packages...
error /usr/home/khng/.config/yarn/global/node_modules/code-server/test/node_modules/playwright: Command failed.
Exit code: 1
Command: node install.js
Arguments:
Directory: /usr/home/khng/.config/yarn/global/node_modules/code-server/test/node_modules/playwright
Output:
/usr/home/khng/.config/yarn/global/node_modules/code-server/test/node_modules/playwright-core/lib/utils/registry.js:180
if (process.platform === 'linux') cacheDirectory = process.env.XDG_CACHE_HOME || _path.default.join(os.homedir(), '.cache');else if (process.platform === 'darwin') cacheDirectory = _path.default.join(os.homedir(), 'Library', 'Caches');else if (process.platform === 'win32') cacheDirectory = process.env.LOCALAPPDATA || _path.default.join(os.homedir(), 'AppData', 'Local');else throw new Error('Unsupported platform: ' + process.platform);
^
Error: Unsupported platform: freebsd
at /usr/home/khng/.config/yarn/global/node_modules/code-server/test/node_modules/playwright-core/lib/utils/registry.js:180:388
at Object.<anonymous> (/usr/home/khng/.config/yarn/global/node_modules/code-server/test/node_modules/playwright-core/lib/utils/registry.js:194:3)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:93:18)
at Object.<anonymous> (/usr/home/khng/.config/yarn/global/node_modules/code-server/test/node_modules/playwright/install.js:17:49)
at Module._compile (internal/modules/cjs/loader.js:1085:14) |
Thank you! Now I'm a little confused. You're cloning it but then you're running What is your end goal? To run code-server locally or contribute? If you want to use code-server, you should follow the docs and use the install script. If you're trying to contribute, then we can look into this further. |
That is simple to explain: I just want to run code-server locally. I am doing so to run the current snapshot from the main branch. $ yarn global add code-server
yarn global v1.22.17
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "code-server > @coder/[email protected]" has unmet peer dependency "@google-cloud/logging@^4.5.2".
[4/4] Building fresh packages...
[1/3] ⠂ argon2
[-/3] ⠂ waiting...
error /home/khng/.config/yarn/global/node_modules/argon2: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build
Arguments:
Directory: /home/khng/.config/yarn/global/node_modules/argon2
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | freebsd | x64
node-pre-gyp info check checked for "/usr/home/khng/.config/yarn/global/node_modules/argon2/lib/binding/napi-v3/argon2.node" (not found)
node-pre-gyp http GET https://github.com/ranisalt/node-argon2/releases/download/v0.28.3/argon2-v0.28.3-napi-v3-freebsd-x64-unknown.tar.gz
node-pre-gyp ERR! install response status 404 Not Found on https://github.com/ranisalt/node-argon2/releases/download/v0.28.3/argon2-v0.28.3-napi-v3-freebsd-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v83 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/ranisalt/node-argon2/releases/download/v0.28.3/argon2-v0.28.3-napi-v3-freebsd-x64-unknown.tar.gz
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | freebsd | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | freebsd | x64
gyp info find Python using Python version 3.8.12 found at "/usr/local/bin/python3.8"
gyp info spawn /usr/local/bin/python3.8
gyp info spawn args [
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/usr/home/khng/.config/yarn/global/node_modules/argon2/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/khng/.cache/node-gyp/14.18.1/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/khng/.cache/node-gyp/14.18.1',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/khng/.cache/node-gyp/14.18.1/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/usr/home/khng/.config/yarn/global/node_modules/argon2',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info ok
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | freebsd | x64
gyp info spawn gmake
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
gmake: Entering directory '/usr/home/khng/.config/yarn/global/node_modules/argon2/build'
CC(target) Release/obj.target/libargon2/argon2/src/opt.o
CC(target) Release/obj.target/libargon2/argon2/src/argon2.o
CC(target) Release/obj.target/libargon2/argon2/src/core.o
CC(target) Release/obj.target/libargon2/argon2/src/blake2/blake2b.o
CC(target) Release/obj.target/libargon2/argon2/src/thread.o
CC(target) Release/obj.target/libargon2/argon2/src/encoding.o
AR(target) Release/obj.target/argon2.a
COPY Release/argon2.a
CXX(target) Release/obj.target/argon2/src/argon2_node.o
../src/argon2_node.cpp:52:21: error: assigning to 'uint8_t *' (aka 'unsigned char *') from 'const std::basic_string<unsigned char>::value_type *' (aka 'const unsigned char *') discards qualifiers
ctx.pwd = plain.data();
~~~~~~^~~~~~
../src/argon2_node.cpp:54:21: error: assigning to 'uint8_t *' (aka 'unsigned char *') from 'const std::basic_string<unsigned char>::value_type *' (aka 'const unsigned char *') discards qualifiers
ctx.salt = salt.data();
~~~~~^~~~~~
../src/argon2_node.cpp:56:18: error: assigning to 'uint8_t *' (aka 'unsigned char *') from 'const std::basic_string<unsigned char>::value_type *' (aka 'const unsigned char *') discards qualifiers
ctx.secret = opts.secret.empty() ? nullptr : opts.secret.data();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/argon2_node.cpp:58:14: error: assigning to 'uint8_t *' (aka 'unsigned char *') from 'const std::basic_string<unsigned char>::value_type *' (aka 'const unsigned char *') discards qualifiers
ctx.ad = opts.ad.empty() ? nullptr : opts.ad.data();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/argon2_node.cpp:159:29: warning: implicit conversion from 'unsigned long' to 'uint32_t' (aka 'unsigned int') changes value from 4294967296 to 0 [-Wconstant-conversion]
setMaxMin("memoryCost", ARGON2_MAX_MEMORY, max(ARGON2_MIN_MEMORY, 1024));
~~~~~~~~~ ^~~~~~~~~~~~~~~~~
../src/../argon2/include/argon2.h:68:50: note: expanded from macro 'ARGON2_MAX_MEMORY'
ARGON2_MIN(UINT32_C(0xFFFFFFFF), UINT64_C(1) << ARGON2_MAX_MEMORY_BITS)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
../src/../argon2/include/argon2.h:63:46: note: expanded from macro 'ARGON2_MIN'
#define ARGON2_MIN(a, b) ((a) < (b) ? (a) : (b))
^
1 warning and 4 errors generated.
gmake: *** [argon2.target.mk:117: Release/obj.target/argon2/src/argon2_node.o] Error 1
gmake: Leaving directory '/usr/home/khng/.config/yarn/global/node_modules/argon2/build'
gyp ERR! build error
gyp ERR! stack Error: `gmake` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:400:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:282:12)
gyp ERR! System FreeBSD 13.0-STABLE
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=/usr/home/khng/.config/yarn/global/node_modules/argon2/lib/binding/napi-v3/argon2.node" "--module_name=argon2" "--module_path=/usr/home/khng/.config/yarn/global/node_modules/argon2/lib/binding/napi-v3" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
gyp ERR! cwd /usr/home/khng/.config/yarn/global/node_modules/argon2
gyp ERR! node -v v14.18.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
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=/usr/home/khng/.config/yarn/global/node_modules/argon2/lib/binding/napi-v3/argon2.node --module_name=argon2 --module_path=/usr/home/khng/.config/yarn/global/node_modules/argon2/lib/binding/napi-v3 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/home/khng/.config/yarn/global/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:400:28)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1058:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
node-pre-gyp ERR! System FreeBSD 13.0-STABLE
node-pre-gyp ERR! command "/usr/local/bin/node" "/home/khng/.config/yarn/global/node_modules/argon2/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/home/khng/.config/yarn/global/node_modules/argon2
node-pre-gyp ERR! node -v v14.18.1
node-pre-gyp ERR! node-pre-gyp -v v1.0.7
node-pre-gyp ERR! not ok
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=/usr/home/khng/.config/yarn/global/node_modules/argon2/lib/binding/napi-v3/argon2.node --module_name=argon2 --module_path=/usr/home/khng/.config/yarn/global/node_modules/argon2/lib/binding/napi-v3 --napi_version=8 --node_abi_
|
In this case, it sounds similar to contributing. Assuming you followed the docs, let's see if we can figure out what's wrong.
Ah, I see. Is this bug Linux specific? I'm surprised @code-asher isn't running into this as he is on Linux. Hmm...I really regret adding node-argon2. It's causing a lot of trouble. We are looking into replacing it potentially here. |
My guess for that problem was that node-argon2 was only trying to enforce C++17 on Linux only. Here is the fix for this part: ranisalt/node-argon2#332 |
Oh wow! You submitted a patch upstream - that is awesome! 🙌 I hope that resolves it. |
That is only one of the problem, another one is actually mentioned above. I do want to know if it is safe to skip the test/ module as a temporary workarond. EDIT: I noticed that |
Yes! Any testing modules can be safely skipped :) |
node-rs now publishes an argon2 package. Might help here: https://github.com/napi-rs/node-rs/tree/main/packages/argon2 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days. |
OS/Web Information
code-server --version
: N/ASteps to Reproduce
Fix argon2 dependency to 0.28.2 to build.
Expected
It should build.
Actual
--- stderr ---
Logs
Screenshot
Notes
This issue can be reproduced in VS Code: Yes/No
The text was updated successfully, but these errors were encountered: