Skip to content
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

[WINDOWS OS] build/release/pcsclite.node compiled against different nodejs version #126

Closed
shihao92 opened this issue Mar 10, 2022 · 4 comments

Comments

@shihao92
Copy link

shihao92 commented Mar 10, 2022

[1] App threw an error during load
[1] Error: The module '\?\C:\Users\ShiHao\Desktop\works\electron-react-nfc-reader\node_modules@pokusew\pcsclite\build\Release\pcsclite.node'
[1] was compiled against a different Node.js version using
[1] NODE_MODULE_VERSION 83. This version of Node.js requires
[1] NODE_MODULE_VERSION 101. Please try re-compiling or re-installing
[1] the module (for instance, using npm rebuild or npm install).
[1] at process.func [as dlopen] (node:electron/js2c/asar_bundle:5:1800)
[1] at Object.Module._extensions..node (node:internal/modules/cjs/loader:1199:18)
[1] at Object.func [as .node] (node:electron/js2c/asar_bundle:5:1800)
[1] at Module.load (node:internal/modules/cjs/loader:988:32)
[1] at Module._load (node:internal/modules/cjs/loader:829:12)
[1] at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
[1] at Module.require (node:internal/modules/cjs/loader:1012:19)
[1] at require (node:internal/modules/cjs/helpers:102:18)
[1] at bindings (C:\Users\ShiHao\Desktop\works\electron-react-nfc-reader\node_modules\bindings\bindings.js:112:48)
[1] at Object. (C:\Users\ShiHao\Desktop\works\electron-react-nfc-reader\node_modules@pokusew\pcsclite\lib\pcsclite.js:4:37)

Hi, I have no issues running this in mac os but when I tried and run this in Windows the above errors triggered. I tried and downgrade the node version but it ends up saying it needs lower node version. Can someone please help with this? I installed the windows-build-tools and everything which include python version 2.7.3 but still not working.

OS: Windows 10
Node: Version 14.16.1

@shihao92
Copy link
Author

btw npm rebuild or npm install doesn't work in this case in Windows OS

@shihao92
Copy link
Author

npx electron-rebuild

  • Searching dependency tree
    Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
    addon.cpp
    c:\users\shihao.electron-gyp\17.1.2\include\node\v8-internal.h(113): error C2338: Pointer compression can be enabled only for 64-bit architectures [C:\Users\ShiHao\Desktop\works\electron-react-nfc-reader\node_modules@pokusew\pcsclite\build\pcsclite.vcxproj]
    c:\users\shihao.electron-gyp\17.1.2\include\node\v8-internal.h(471): warning C4293: '<<': shift count negative or too big, undefined behavior [C:\Users\ShiHao\Desktop\works\electron-react-nfc-reader\node_modules@pokusew\pcsclite\build\pcsclite.vcxproj]
    c:\users\shihao.electron-gyp\17.1.2\include\node\v8-internal.h(472): warning C4293: '<<': shift count negative or too big, undefined behavior [C:\Users\ShiHao\Desktop\works\electron-react-nfc-reader\node_modules@pokusew\pcsclite\build\pcsclite.vcxproj]
    c:\users\shihao.electron-gyp\17.1.2\include\node\v8-internal.h(509): warning C4305: 'initializing': truncation from 'unsigned __int64' to 'const size_t' [C:\Users\ShiHao\Desktop\works\electron-react-nfc-reader\node_modules@pokusew\pcsclite\build\pcsclite.vcxproj]
    c:\users\shihao.electron-gyp\17.1.2\include\node\v8-internal.h(509): warning C4309: 'initializing': truncation of constant value [C:\Users\ShiHao\Desktop\works\electron-react-nfc-reader\node_modules@pokusew\pcsclite\build\pcsclite.vcxproj]
    c:\users\shihao.electron-gyp\17.1.2\include\node\v8-internal.h(528): warning C4305: 'initializing': truncation from 'unsigned __int64' to 'const size_t' [C:\Users\ShiHao\Desktop\works\electron-react-nfc-reader\node_modules@pokusew\pcsclite\build\pcsclite.vcxproj]
    c:\users\shihao.electron-gyp\17.1.2\include\node\v8-internal.h(528): warning C4309: 'initializing': truncation of constant value [C:\Users\ShiHao\Desktop\works\electron-react-nfc-reader\node_modules@pokusew\pcsclite\build\pcsclite.vcxproj]
    c:\users\shihao.electron-gyp\17.1.2\include\node\v8-internal.h(542): warning C4305: 'initializing': truncation from 'unsigned __int64' to 'const size_t' [C:\Users\ShiHao\Desktop\works\electron-react-nfc-reader\node_modules@pokusew\pcsclite\build\pcsclite.vcxproj]
    c:\users\shihao.electron-gyp\17.1.2\include\node\v8-internal.h(542): warning C4309: 'initializing': truncation of constant value [C:\Users\ShiHao\Desktop\works\electron-react-nfc-reader\node_modules@pokusew\pcsclite\build\pcsclite.vcxproj]
    c:\users\shihao.electron-gyp\17.1.2\include\node\v8-internal.h(557): warning C4305: 'initializing': truncation from 'unsigned __int64' to 'const size_t' [C:\Users\ShiHao\Desktop\works\electron-react-nfc-reader\node_modules@pokusew\pcsclite\build\pcsclite.vcxproj]
    c:\users\shihao.electron-gyp\17.1.2\include\node\v8-internal.h(557): warning C4309: 'initializing': truncation of constant value [C:\Users\ShiHao\Desktop\works\electron-react-nfc-reader\node_modules@pokusew\pcsclite\build\pcsclite.vcxproj]
    c:\users\shihao.electron-gyp\17.1.2\include\node\v8-internal.h(559): error C2338: The virtual memory cage must be larger than the pointer compression cage contained within it. [C:\Users\ShiHao\Desktop\works\electron-react-nfc-reader\node_modules@pokusew\pcsclite\build\pcsclite.vcxproj]
    c:\users\shihao.electron-gyp\17.1.2\include\node\v8-internal.h(563): error C2338: The reservation for a fake virtual memory cage must be larger than the pointer compression cage contained within it. [C:\Users\ShiHao\Desktop\works\electron-react-nfc-reader\node_modules@pokusew\pcsclite\build\pcsclite.vcxproj]
    c:\users\shihao.electron-gyp\17.1.2\include\node\v8-script.h(232): warning C4996: 'v8::Module::ResolveCallback': Use ResolveModuleCallback [C:\Users\ShiHao\Desktop\works\electron-react-nfc-reader\node_modules@pokusew\pcsclite\build\pcsclite.vcxproj]
    c:\users\shihao.electron-gyp\17.1.2\include\node\v8-script.h(214): note: see declaration of 'v8::Module::ResolveCallback'
    c:\users\shihao.electron-gyp\17.1.2\include\node\v8-typed-array.h(28): warning C4309: 'static_cast': truncation of constant value [C:\Users\ShiHao\Desktop\works\electron-react-nfc-reader\node_modules@pokusew\pcsclite\build\pcsclite.vcxproj]
    × Rebuild Failed

An unhandled error occurred inside electron-rebuild
node-gyp failed to rebuild 'C:\Users\ShiHao\Desktop\works\electron-react-nfc-reader\node_modules@pokusew\pcsclite'.
For more information, rerun with the DEBUG environment variable set to "electron-rebuild".

Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1

Error: node-gyp failed to rebuild 'C:\Users\ShiHao\Desktop\works\electron-react-nfc-reader\node_modules@pokusew\pcsclite'.
For more information, rerun with the DEBUG environment variable set to "electron-rebuild".

Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1

at NodeGyp.rebuildModule (C:\Users\ShiHao\Desktop\works\electron-react-nfc-reader\node_modules\electron-rebuild\lib\src\module-type\node-gyp.js:117:19)
at processTicksAndRejections (internal/process/task_queues.js:97:5)

@shihao92
Copy link
Author

found the main issue
c:\users\shihao.electron-gyp\17.1.2\include\node\v8-internal.h(113): error C2338: Pointer compression can be enabled only for 64-bit architectures [C:\Users\ShiHao\Desktop\works\electron-react-nfc-reader\node_modules@pokusew\pcsclite\build\pcsclite.vcxproj]

@shihao92
Copy link
Author

is this because of the issue with the build tools?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant