maybe icon indicating copy to clipboard operation
maybe copied to clipboard

Current build from commit 447f598 fails at yarn install

Open ethernet6 opened this issue 1 year ago • 5 comments

Current build from commit 447f598 fails at yarn install, lots of warnings given and critically fails here when trying to download Cypress.

Yarn version 1.22.21

Exit code: 1
Command: node index.js --exec install
Arguments:
Directory: ....
Output:
Installing Cypress (version: 12.3.0)
URL: https://download.cypress.io/desktop/12.3.0?platform=win32&arch=x64
Error: Corrupted download

Expected downloaded file to have checksum: cc3a12a75acefc49263589d63e8a815d833c8ecaae3ffce5dffb7ea32a3c6b1216358962682f7280bf1c745862446c62dd812a3d76d56f373e919c1e876f91cf
Computed checksum: 08fb9790b9705d3ebcb325a0d2aba26cc66d0b850ffb3a7329c5746de42c63c9e31c320256ff62fc0a0402b5447034af990af09eeed98ca98359176b1f9c1fba

Expected downloaded file to have size: 179037094
Computed size: 171718440

Internet connection is fine. Download always fails and anti-virus is down to allow install/stop it interferring.

ethernet6 avatar Jan 13 '24 16:01 ethernet6

@ethernet6 Can you give more info about the machine you're working from?

Shpigford avatar Jan 13 '24 19:01 Shpigford

Specs: Win 10 Pro 22H2 64-bit Intel Duo i5 2.2 GHz, 12 GB RAM Yarn version 1.22.21 Npm version 9.5.1 WSL version 2

Running from command line.

ethernet6 avatar Jan 13 '24 20:01 ethernet6

I received many warnings during installation, however none related to Cypress. It seems that cypress was installed correctly. However I received an error while downloading an optional dependency "msgpackr-extract" which I believe is because Visual Studio is not installed on my system.

mgautam07 avatar Jan 14 '24 12:01 mgautam07

I received many warnings during installation, however none related to Cypress. It seems that cypress was installed correctly. However I received an error while downloading an optional dependency "msgpackr-extract" which I believe is because Visual Studio is not installed on my system.

I tried installing with Node v18.17.0 and v20.10.0. When using v20.10.0 I get the following error related to msgpackr-extract

Click here to see the error
warning Error running install script for optional dependency: "/Users/user123/git/maybe/node_modules/msgpackr-extract: Command failed.
Exit code: 1
Command: node-gyp-build
Arguments:
Directory: /Users/user123/git/maybe/node_modules/msgpackr-extract
Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info find Python using Python version 3.11.6 found at \"/usr/local/opt/[email protected]/bin/python3.11\"

gyp info spawn /usr/local/opt/[email protected]/bin/python3.11
gyp info spawn args [
gyp info spawn args '/Users/user123/.nvm/versions/node/v20.10.0/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 '/Users/user123/git/maybe/node_modules/msgpackr-extract/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/user123/.nvm/versions/node/v20.10.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/user123/Library/Caches/node-gyp/20.10.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/user123/Library/Caches/node-gyp/20.10.0',
gyp info spawn args '-Dnode_gyp_dir=/Users/user123/.nvm/versions/node/v20.10.0/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/user123/Library/Caches/node-gyp/20.10.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/user123/git/maybe/node_modules/msgpackr-extract',
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 spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/msgpackr-extract/src/extract.o
In file included from ../src/extract.cpp:11:
In file included from ../node_modules/nan/nan.h:178:
../node_modules/nan/nan_callbacks.h:55:23: error: no member named 'AccessorSignature' in namespace 'v8'
typedef v8::Local<v8::AccessorSignature> Sig;
                  ~~~~^
In file included from ../src/extract.cpp:11:
../node_modules/nan/nan.h:684:39: warning: 'IdleNotificationDeadline' is deprecated: Use MemoryPressureNotification() to influence the GC schedule. [-Wdeprecated-declarations]
    return v8::Isolate::GetCurrent()->IdleNotificationDeadline(
                                      ^
/Users/user123/Library/Caches/node-gyp/20.10.0/include/node/v8-isolate.h:1291:3: note: 'IdleNotificationDeadline' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON(
  ^
/Users/user123/Library/Caches/node-gyp/20.10.0/include/node/v8config.h:550:39: note: expanded from macro 'V8_DEPRECATE_SOON'
# define V8_DEPRECATE_SOON(message) [[deprecated(message)]]
                                      ^
In file included from ../src/extract.cpp:11:
../node_modules/nan/nan.h:2544:8: error: no matching member function for call to 'SetAccessor'
  tpl->SetAccessor(
  ~~~~~^~~~~~~~~~~
/Users/user123/Library/Caches/node-gyp/20.10.0/include/node/v8-template.h:816:8: note: candidate function not viable: no known conversion from 'imp::Sig' (aka 'int') to 'v8::SideEffectType' for 7th argument
  void SetAccessor(
       ^
/Users/user123/Library/Caches/node-gyp/20.10.0/include/node/v8-template.h:809:8: note: candidate function not viable: no known conversion from 'imp::NativeGetter' (aka 'void (*)(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value> &)') to 'v8::AccessorGetterCallback' (aka 'void (*)(Local<v8::String>, const PropertyCallbackInfo<v8::Value> &)') for 2nd argument
  void SetAccessor(
       ^
1 warning and 2 errors generated.
make: *** [Release/obj.target/msgpackr-extract/src/extract.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.<anonymous> (/Users/user123/.nvm/versions/node/v20.10.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
gyp ERR! System Darwin 23.1.0
gyp ERR! command \"/Users/user123/.nvm/versions/node/v20.10.0/bin/node\" \"/Users/user123/.nvm/versions/node/v20.10.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"rebuild\"
gyp ERR! cwd /Users/user123/git/maybe/node_modules/msgpackr-extract

I did some digging and found this issue.

bull package in this repo depends on msgpackr which depends on msgpackr-extract which has nan 2.14.2, the fix is in nan 2.17.0 ("fix" here means, fix for Node 20) One thing to note here is msgpackr -> msgpackr-extract is an optional dependency

@mgautam07 so you could try with Node v18 or try installing with yarn install --ignore-optional to validate if that was the issue

This brings me to the question, what version of npm/node should be used while installing? (Perhaps, should be added to the README? or add an .nvmrc - sorry, if I missed)?

Vin-it avatar Jan 14 '24 18:01 Vin-it

@Vin-it using yarn install --ignore-optional did not give the error. @Shpigford can the issue be closed since installing cypress works fine for both me and vin-it and the issue is not reproducible?

mgautam07 avatar Jan 15 '24 18:01 mgautam07

Since #218 was merged moving to pnpm going to close this out, please feel free to re-open if the issue persists.

tmyracle avatar Jan 29 '24 16:01 tmyracle