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 error while installing. #5

Open
muzam1l opened this issue Aug 18, 2021 · 3 comments
Open

Build error while installing. #5

muzam1l opened this issue Aug 18, 2021 · 3 comments

Comments

@muzam1l
Copy link

muzam1l commented Aug 18, 2021

So it fails on installing with following error log. I have VS2017 installed via windows-build-tools.

Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  addon.c
  napi_utils.c
  utils.c  
  context.c
  device.c 
c:\users\muzam\code\extensions\saturday\node_modules\playcap\src\device.c(39): error C2057: expected constant expression [C:\Users\muzam\code\ex
tensions\saturday\node_modules\playcap\build\playcap.vcxproj]
c:\users\muzam\code\extensions\saturday\node_modules\playcap\src\device.c(39): error C2466: cannot allocate an array of constant size 0 [C:\User
s\muzam\code\extensions\saturday\node_modules\playcap\build\playcap.vcxproj]
c:\users\muzam\code\extensions\saturday\node_modules\playcap\src\device.c(39): error C2133: 'outputData': unknown size [C:\Users\muzam\code\exte
nsions\saturday\node_modules\playcap\build\playcap.vcxproj]
c:\users\muzam\code\extensions\saturday\node_modules\playcap\src\device.c(40): error C2057: expected constant expression [C:\Users\muzam\code\ex
tensions\saturday\node_modules\playcap\build\playcap.vcxproj]
c:\users\muzam\code\extensions\saturday\node_modules\playcap\src\device.c(40): error C2466: cannot allocate an array of constant size 0 [C:\User
s\muzam\code\extensions\saturday\node_modules\playcap\build\playcap.vcxproj]
c:\users\muzam\code\extensions\saturday\node_modules\playcap\src\device.c(40): error C2133: 'inputData': unknown size [C:\Users\muzam\code\exten
sions\saturday\node_modules\playcap\build\playcap.vcxproj]
c:\users\muzam\code\extensions\saturday\node_modules\playcap\src\device.c(85): error C2057: expected constant expression [C:\Users\muzam\code\ex
tensions\saturday\node_modules\playcap\build\playcap.vcxproj]
c:\users\muzam\code\extensions\saturday\node_modules\playcap\src\device.c(85): error C2466: cannot allocate an array of constant size 0 [C:\User
s\muzam\code\extensions\saturday\node_modules\playcap\build\playcap.vcxproj]
c:\users\muzam\code\extensions\saturday\node_modules\playcap\src\device.c(85): error C2133: 'argv': unknown size [C:\Users\muzam\code\extensions
\saturday\node_modules\playcap\build\playcap.vcxproj]
c:\users\muzam\code\extensions\saturday\node_modules\playcap\src\context.c(52): error C2059: syntax error: '}' [C:\Users\muzam\code\extensions\s
aturday\node_modules\playcap\build\playcap.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Windows_NT 10.0.19043
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\muzam\code\extensions\saturday\node_modules\playcap
gyp ERR! node -v v14.15.4
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN [email protected] requires a peer of acorn@^8 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
@muzam1l
Copy link
Author

muzam1l commented Aug 19, 2021

So it's basically issues related to initializing variable size array of pointers, which can be better maintained by allocating memory through malloc or just using c99 in compiler flags. I can make a pull request to implement that, if you want.

@dimapaloskin
Copy link
Owner

Hello @muzam1l. Sorry for the delay.
Unfortunately, I didn't test it on a windows machine, so yes, if it possible, please make a PR.

Thank you :)

@ser0ja
Copy link

ser0ja commented Feb 17, 2022

i get an error when installing on windows

Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.  
addon.c  
napi_utils.c  
utils.c    
context.c  
f:\dropbox\development\javascript\si\node_modules\playcap\src\context.c(52): error C2059: syntax error: '}' F:\Dropbox\Development\javascript\si\node_modules\playcap\build\playcap.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info find Python using Python version 3.10.2 found at "C:\Program Files\Python310\python.exe"
gyp info find VS using VS2022 (17.1.32210.238) found at:
gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools"

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

3 participants