cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
46.84k stars 3.17k forks source link

Add support for OpenBSD/adJ #29342

Open vtamara opened 5 months ago

vtamara commented 5 months ago

What would you like?

That cypress works in OpenBSD/adJ

Why is this needed?

Currently it is not supported and it is not possible to test with it, neither use projects like ionic that depend on cypress

Other

% doas npm install -g cypress
npm ERR! code 1
npm ERR! path /usr/local/lib/node_modules/cypress
npm ERR! command failed
npm ERR! command sh -c node index.js --exec install
npm ERR! Platform: "openbsd" is not supported.

npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-04-16T13_17_07_350Z-debug-0.log

The file /root/.npm/_logs/2024-04-16T13_17_07_350Z-debug-0.log includes:

1037 info run cypress@13.7.3 postinstall node_modules/cypress node index.js --exec install
1038 info run cypress@13.7.3 postinstall { code: 1, signal: null }
1039 timing reify:rollback:createSparse Completed in 1468ms
1040 timing reify:rollback:retireShallow Completed in 0ms
1041 timing command:install Completed in 14209ms
1042 verbose stack Error: command failed
1042 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:53:27)
1042 verbose stack     at ChildProcess.emit (node:events:517:28)
1042 verbose stack     at maybeClose (node:internal/child_process:1098:16)
1042 verbose stack     at ChildProcess._handle.onexit (node:internal/child_process:303:5)
1043 verbose pkgid cypress@13.7.3
1044 verbose cwd /home/vtamara/comp/js
1045 verbose OpenBSD 7.4
1046 verbose node v18.18.0
1047 verbose npm  v10.5.2
1048 error code 1
1049 error path /usr/local/lib/node_modules/cypress
1050 error command failed
1051 error command sh -c node index.js --exec install
1052 error Platform: "openbsd" is not supported.
1053 verbose exit 1
1054 timing npm Completed in 14600ms
vtamara commented 5 months ago

Forking the repository and in the branch develop running: CYPRESS_INSTALL_BINARY=0 npm install --legacy-peer-deps advances including the compilation of better_sqlite3.node and after that it produces:

44 warnings generated.                                                          
  SOLINK_MODULE(target) Release/obj.target/better_sqlite3.node                  
  COPY Release/better_sqlite3.node                                              
  CC(target) Release/obj.target/test_extension/deps/test_extension.o            
  SOLINK_MODULE(target) Release/obj.target/test_extension.node                  
  COPY Release/test_extension.node
rm ba23eeee118cd63e16015df367567cb043fed872.intermediate
gmake: se sale del directorio '/home/vtamara/comp/js/cypress/node_modules/better-sqlite3/build'
✔ Rebuild Complete                      
Done in 44.42s.                         

 ——————————————————————————————————————————————————————————————————————————————

 >  Lerna (powered by Nx)   Ran target rebuild-better-sqlite3 for project @packages/server (45s)

    ✖    0/0 failed                     
    ✔    0/0 succeeded [0 read from cache]

 >  Lerna (powered by Nx)   Nx Cloud Problems                                                                                                                   

   Cannot read properties of null (reading 'sendMessage')                       

 >  Lerna (powered by Nx)   Cannot read properties of null (reading 'sendMessage')

   Pass --verbose to see the stacktrace.                                        

node:child_process:965                                                          
    throw err;                                                                                                                                                  
    ^                                   

Error: Command failed: patch-package && yarn-deduplicate --strategy=highest && lerna run rebuild-better-sqlite3 --scope @packages/server && yarn build && yarn b
uild-v8-snapshot-dev                                                            
    at checkExecSyncError (node:child_process:890:11)
    at execSync (node:child_process:962:15)                                                                                                                     
    at Object.<anonymous> (/home/vtamara/comp/js/cypress/scripts/run-postInstall.js:10:1)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)                   
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)                                                                       
    at node:internal/main/run_main_module:23:47 {                               
  status: 1,                                                                    
  signal: null,                                                                 
  output: [ null, null, null ],                                                 
  pid: 11059,                                                                                                                                                   
  stdout: null,                                                                 
  stderr: null                                                                  
}                                       

Node.js v18.18.0                                                                                                                                                
npm error code 1                        
npm error path /home/vtamara/comp/js/cypress
npm error command failed                                                                                                                                        
npm error command sh -c node ./scripts/run-postInstall.js                       

npm error A complete log of this run can be found in: /home/vtamara/.npm/_logs/2024-05-02T08_59_52_906Z-debug-0.log 

Any suggestion on how to continue?