Rocket.chat.electron: Errors when using Node 12.0.0 in Windows 10

Created on 28 Apr 2019  路  6Comments  路  Source: RocketChat/Rocket.Chat.Electron

My Setup

  • Operating System: Windows 10 x64 / Version: 1809
  • App Version: 2.15.2-Develop

  • [x] I have tested with the latest version
  • [x] I can simulate the issue easily

Description

  • Install Node Js 12.0.0
  • Install all the required tools and configurations using Microsoft's windows-build-tools using npm install --global --production windows-build-tools from an elevated PowerShell or CMD.exe (run as Administrator).
  • Install Yarn Stable 1.15.2
git clone https://github.com/RocketChat/Rocket.Chat.Electron.git
cd Rocket.Chat.Electron
yarn

Errors start at this point.

Current Behavior

error C:\Users\franc\OneDrive\Documents\JungleWP\Apps\Development\Rocket.Chat.El ectron\node_modules\@paulcbetts\system-idle-time: Command failed. Exit code: 1 Command: node-gyp rebuild Arguments: Directory: C:\Users\franc\OneDrive\Documents\JungleWP\Apps\Development\Rocket.Ch at.Electron\node_modules\@paulcbetts\system-idle-time Output: C:\Users\franc\OneDrive\Documents\JungleWP\Apps\Development\Rocket.Chat.Electron \node_modules\@paulcbetts\system-idle-time>if not defined npm_config_node_gyp (n ode "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modul es\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 spawn C:\Python27\python.EXE gyp info spawn args [ gyp info spawn args 'C:\\Program ' + gyp info spawn args 'Files\\nodejs\\node_modules\\npm\\node_modules\\node-gy p\\gyp\\gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'msvs', gyp info spawn args '-G', gyp info spawn args 'msvs_version=2015', gyp info spawn args '-I', gyp info spawn args 'C:\\Users\\franc\\OneDrive\\Documents\\JungleWP\\Apps\\De velopment\\Rocket.Chat.Electron\\node_modules\\@paulcbetts\\system-idle-time\\bu ild\\config.gypi', gyp info spawn args '-I', gyp info spawn args 'C:\\Program Files\\nodejs\\node_modules\\npm\\node_module s\\node-gyp\\addon.gypi', gyp info spawn args '-I', gyp info spawn args 'C:\\Users\\franc\\.node-gyp\\12.0.0\\include\\node\\commo n.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=C:\\Users\\franc\\.node-gyp\\12.0.0', gyp info spawn args '-Dnode_gyp_dir=C:\\Program ' + gyp info spawn args 'Files\\nodejs\\node_modules\\npm\\node_modules\\node-gy p', gyp info spawn args '-Dnode_lib_file=C:\\Users\\franc\\.node-gyp\\12.0.0\\<(ta rget_arch)\\node.lib', gyp info spawn args '-Dmodule_root_dir=C:\\Users\\franc\\OneDrive\\Documents\\ JungleWP\\Apps\\Development\\Rocket.Chat.Electron\\node_modules\\@paulcbetts\\sy stem-idle-time', 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 'C:\\Users\\franc\\OneDrive\\Documents\\JungleWP\\Apps\\De velopment\\Rocket.Chat.Electron\\node_modules\\@paulcbetts\\system-idle-time\\bu ild', gyp info spawn args '-Goutput_dir=.' gyp info spawn args ] gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MS Build\15.0\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. module.cc idle.cc win_delay_load_hook.cc c:\users\franc\onedrive\documents\junglewp\apps\development\rocket.chat.electron \node_modules\nan\nan_converters_43_inl.h(22): warning C4996: 'v8::Value::ToBool ean': was declared deprecated (compiling source file ..\src\module.cc) [C:\Users \franc\OneDrive\Documents\JungleWP\Apps\Development\Rocket.Chat.Electron\node_mo dules\@paulcbetts\system-idle-time\build\system_idle_time.vcxproj] c:\users\franc\.node-gyp\12.0.0\include\node\v8.h(2523): note: see declaration of 'v8::Value::ToBoolean' (compiling source file ..\src\module.cc) c:\users\franc\onedrive\documents\junglewp\apps\development\rocket.chat.electron \node_modules\nan\nan_converters_43_inl.h(40): warning C4996: 'v8::Value::Boolea nValue': was declared deprecated (compiling source file ..\src\module.cc) [C:\Us ers\franc\OneDrive\Documents\JungleWP\Apps\Development\Rocket.Chat.Electron\node _modules\@paulcbetts\system-idle-time\build\system_idle_time.vcxproj] c:\users\franc\.node-gyp\12.0.0\include\node\v8.h(2561): note: see declaration of 'v8::Value::BooleanValue' (compiling source file ..\src\module.cc) c:\users\franc\onedrive\documents\junglewp\apps\development\rocket.chat.electron \node_modules\nan\nan_implementation_12_inl.h(356): error C2660: 'v8::StringObje ct::New': function does not take 1 arguments (compiling source file ..\src\modul e.cc) [C:\Users\franc\OneDrive\Documents\JungleWP\Apps\Development\Rocket.Chat.E lectron\node_modules\@paulcbetts\system-idle-time\build\system_idle_time.vcxproj ] c:\users\franc\.node-gyp\12.0.0\include\node\v8.h(5380): note: see declaration of 'v8::StringObject::New' (compiling source file ..\src\module.cc) c:\users\franc\onedrive\documents\junglewp\apps\development\rocket.chat.electron \node_modules\nan\nan_implementation_12_inl.h(356): error C2059: syntax error: ' )' (compiling source file ..\src\module.cc) [C:\Users\franc\OneDrive\Documents\J ungleWP\Apps\Development\Rocket.Chat.Electron\node_modules\@paulcbetts\system-id le-time\build\system_idle_time.vcxproj] c:\users\franc\onedrive\documents\junglewp\apps\development\rocket.chat.electron \node_modules\nan\nan_object_wrap.h(24): error C2039: 'IsNearDeath': is not a me mber of 'Nan::Persistent<v8::Object,v8::NonCopyablePersistentTraits<T>>' [C:\Use rs\franc\OneDrive\Documents\JungleWP\Apps\Development\Rocket.Chat.Electron\node_ modules\@paulcbetts\system-idle-time\build\system_idle_time.vcxproj] with [ T=v8::Object ] (compiling source file ..\src\module.cc) c:\users\franc\onedrive\documents\junglewp\apps\development\rocket.chat.electr on\node_modules\nan\nan.h(1920): note: see declaration of 'Nan::Persistent<v8::O bject,v8::NonCopyablePersistentTraits<T>>' with [ T=v8::Object ] (compiling source file ..\src\module.cc) c:\users\franc\onedrive\documents\junglewp\apps\development\rocket.chat.electron \node_modules\nan\nan_object_wrap.h(127): error C2039: 'IsNearDeath': is not a m ember of 'Nan::Persistent<v8::Object,v8::NonCopyablePersistentTraits<T>>' [C:\Us ers\franc\OneDrive\Documents\JungleWP\Apps\Development\Rocket.Chat.Electron\node _modules\@paulcbetts\system-idle-time\build\system_idle_time.vcxproj] with [ T=v8::Object ] (compiling source file ..\src\module.cc) c:\users\franc\onedrive\documents\junglewp\apps\development\rocket.chat.electr on\node_modules\nan\nan.h(1920): note: see declaration of 'Nan::Persistent<v8::O bject,v8::NonCopyablePersistentTraits<T>>' with [ T=v8::Object ] (compiling source file ..\src\module.cc) gyp ERR! build error gyp ERR! stack Error:C:\Program Files (x86)Microsoft Visual Studio\2017\Build
ToolsMSBuild15.0\BinMSBuild.exefailed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\ npm\node_modules\node-gyp\lib\build.js:262:23) gyp ERR! stack at ChildProcess.emit (events.js:196:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces s.js:256:12) gyp ERR! System Windows_NT 10.0.17763 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodej s\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" gyp ERR! cwd C:\Users\franc\OneDrive\Documents\JungleWP\Apps\Development\Rocket. Chat.Electron\node_modules\@paulcbetts\system-idle-time gyp ERR! node -v v12.0.0

Expected Behavior


The node modules should be built.

Most helpful comment

Update: I uninstalled nodejs 12.0.0 and installed node-v11.14.0-x64 and it fixed the problem.

Don't update to Node 12.0.0 yet.

Ref: issue 279

All 6 comments

Update: I uninstalled nodejs 12.0.0 and installed node-v11.14.0-x64 and it fixed the problem.

Don't update to Node 12.0.0 yet.

Ref: issue 279

@franckadil Thanks for find that out!

Is there work being done to support v12?

New nodejs programmer here, I got here by google search, after I switch to nodejs 10, a similar error occurred, and stackoverflow tell me to switch nodejs 8, so does anyone have a solution so I don't need to switch to nodejs v1?

@paranoid945 If you can't set the Node version, you need to check which dependencies are building native modules and if they support you Node version.

I'm closing this issue as we're running under Node v12 via Electron 10 now.

Was this page helpful?
0 / 5 - 0 ratings