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

Build failing on get-cursor-position #32

Open
fumiichan opened this issue Mar 15, 2020 · 2 comments
Open

Build failing on get-cursor-position #32

fumiichan opened this issue Mar 15, 2020 · 2 comments

Comments

@fumiichan
Copy link

Greetings. I wasn't able to install this package because get-cursor-position fails to build.

Logs:

yarn add v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
error D:\User Directories\Code\Projects\<REDACTED>\node_modules\get-cursor-position: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments: 
Directory: D:\User Directories\Code\Projects\<REDACTED>\node_modules\get-cursor-position
Output:
D:\User Directories\Code\Projects\<REDACTED>\node_modules\get-cursor-position>if not defined npm_config_node_gyp (node "C:\Dev\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info find Python using Python version 3.8.1 found at "C:\Dev\python\python.exe"
gyp info find VS using VS2019 (16.4.29806.167) found at:
gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Dev\python\python.exe
gyp info spawn args [
gyp info spawn args   'C:\\Dev\\nodejs\\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   'msvs',
gyp info spawn args   '-I',
gyp info spawn args   'D:\\User Directories\\Code\\Projects\\<REDACTED>\\node_modules\\get-cursor-position\\build\\config.gypi', 
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Dev\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\<REDACTED>\\AppData\\Local\\node-gyp\\Cache\\13.9.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=C:\\Users\\<REDACTED>\\AppData\\Local\\node-gyp\\Cache\\13.9.0',
gyp info spawn args   '-Dnode_gyp_dir=C:\\Dev\\nodejs\\node_modules\\npm\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\<REDACTED>\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\13.9.0\\\\<(target_arch)\\\\node.lib',
gyp info spawn args   '-Dmodule_root_dir=D:\\User Directories\\Code\\Projects\\<REDACTED>\\node_modules\\get-cursor-position',   
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   'D:\\User Directories\\Code\\Projects\\<REDACTED>\\node_modules\\get-cursor-position\\build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe
gyp info spawn args [
gyp info spawn args   'build/binding.sln',
gyp info spawn args   '/clp:Verbosity=minimal',
gyp info spawn args   '/nologo',
gyp info spawn args   '/p:Configuration=Release;Platform=x64'
gyp info spawn args ]
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
  win_delay_load_hook.cc
  pos.cc
D:\User Directories\Code\Projects\<REDACTED>\node_modules\get-cursor-position\src\pos.cc(272,76): error C2661: 'v8::Object::Set': no overloaded function takes 2 arguments [D:\User Directories\Code\Projects\<REDACTED>\node_modules\get-cursor-position\build\pos.vcxproj]
D:\User Directories\Code\Projects\<REDACTED>\node_modules\get-cursor-position\src\pos.cc(273,76): error C2661: 'v8::Object::Set': no overloaded function takes 2 arguments [D:\User Directories\Code\Projects\<REDACTED>\node_modules\get-cursor-position\build\pos.vcxproj]
D:\User Directories\Code\Projects\<REDACTED>\node_modules\get-cursor-position\src\pos.cc(277,11): error C2065: 'Handle': undeclared identifier [D:\User Directories\Code\Projects\<REDACTED>\node_modules\get-cursor-position\build\pos.vcxproj]
D:\User Directories\Code\Projects\<REDACTED>\node_modules\get-cursor-position\src\pos.cc(277,18): error C2275: 'v8::Object': illegal use of this type as an expression [D:\User Directories\Code\Projects\<REDACTED>\node_modules\get-cursor-position\build\pos.vcxproj]
C:\Users\���q���{\AppData\Local\node-gyp\Cache\13.9.0\include\node\v8.h(3541): message : see declaration of 'v8::Object' [D:\User Directories\Code\Projects\<REDACTED>\node_modules\get-cursor-position\build\pos.vcxproj]
D:\User Directories\Code\Projects\<REDACTED>\node_modules\get-cursor-position\src\pos.cc(277,26): error C2065: 'exports': undeclared identifier [D:\User Directories\Code\Projects\<REDACTED>\node_modules\get-cursor-position\build\pos.vcxproj]
D:\User Directories\Code\Projects\<REDACTED>\node_modules\get-cursor-position\src\pos.cc(277,33): error C2182: 'Init': illegal use of type 'void' [D:\User Directories\Code\Projects\<REDACTED>\node_modules\get-cursor-position\build\pos.vcxproj]
D:\User Directories\Code\Projects\<REDACTED>\node_modules\get-cursor-position\src\pos.cc(277,35): error C2448: 'Init': function-style initializer appears to be a function definition [D:\User Directories\Code\Projects\<REDACTED>\node_modules\get-cursor-position\build\pos.vcxproj]
D:\User Directories\Code\Projects\<REDACTED>\node_modules\get-cursor-position\src\pos.cc(283,1): warning C4312: 'type cast': conversion from 'int' to 'node::addon_register_func' of greater size [D:\User Directories\Code\Projects\<REDACTED>\node_modules\get-cursor-position\build\pos.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1 
gyp ERR! stack     at ChildProcess.onExit (C:\Dev\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:321:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\\Dev\\nodejs\\node.exe" "C:\\Dev\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\User Directories\Code\Projects\<REDACTED>\node_modules\get-cursor-position
gyp ERR! node -v v13.9.0
gyp ERR! node-gyp -v v5.0.7
gyp ERR! not ok
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Python 3.8.1, Node.js 13.9.0, Yarn 1.22.4
Currently on Windows 10 Pro Build 1909 (OS Build 18363.657)

@DarkAxi0m
Copy link

I know this is 3 years old at this stage, but did you happy to find a solution?

@fumiichan
Copy link
Author

Unfortunately, I haven't. I can't really waste my time figuring out how to fix compilation issues goes around with node-gyp that time. Instead I just used other similar terminal progress bars in the project.

Good thing npm has bountiful amount of similar packages as these.

What you can try is to use LTS versions of node.js if that helps, otherwise you can find other similar packages that achieves similar result.

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

2 participants