react-native -v
:
react-native-cli: 2.0.1
react-native: 0.55.4
npm ls rnpm-plugin-windows
:
[email protected]
npm ls react-native-windows
:
[email protected]
node -v
:
v8.11.1
npm -v
:
yarn --version
:Then, specify:
When runs on another machine should work the same way as on my machine.
Works fine on my machine but not on others. Shows the following error: The type initializer for Facebook.Yoga.YogaConfig threw an exception
Seems like a compatibility issue with yoga.dll. What are details for the other computer you are trying to run on?
Thank you for your answer. The other PC I tried on is Windows 8.1 Pro with .NET 4.6.
Are both x64 (or did you compile for x86)?
Both PC are x64 and the app is compiled for x64 as well. Using DebugBundle to see the error, I tried ReleaseBundle as well but had the same issue without the red screen.
@markhomoki - yoga targets vcruntime140.dll / msvcp140.dll - is that available in c:\Windows\System32
on your Windows 8.1 machine?
Good spot, thanks. I have it on my machine, but its not on the 8.1 machine.
Any idea how can install with the bundle?
I would think this would be included in a Windows update, but if not you can install Microsoft Visual C++ 2015 Redistributable. Not sure the about the right way to package this up in an installer for Windows 8.1.
So I tried on another Windows 10.1 Pro machine where those 2 files have been installed and still got the same error. On the Windows 8.1 I installed the Microsoft Visual C++ 2015 Redistributable and still have the same error. However on my machine still works fine.
Quick update: managed to run the app on another PC when Windows 10 SDK was installed. This is 1.6GB with the required files so it's not an option. From the installed files I could figure out that it only requires Universal CRT tools x86 which is only 700kb.
I found this online on MS website:
Updated September 11, 2015: App-local deployment of the Universal CRT is supported. To obtain the binaries for app-local deployment, install the Windows Software Development Kit (SDK) for Windows 10. The binaries will be installed to C:\Program Files (x86)\Windows Kits\10\Redist\ucrt. You will need to copy all of the DLLs with your app (note that the set of DLLs are necessary is different on different versions of Windows, so you must include all of the DLLs in order for your program to run on all supported versions of Windows)
I added the required dlls and published with the app as detailed above but unfortunately still does not run. Question is how to bundle it with the app?
I'm confused why it would need to be bundled with the Universal CRT if you are building it for WPF / Desktop.
@markhomoki - can you find your build output directory and run:
dumpbin /dependents yoga.dll
I'm still confused why the Universal CRT would be req'd.
I am not sure either. This is the output of dumpbin:
```
Dump of file yoga.dll
File Type: DLL
Image has the following dependencies:
MSVCP140D.dll
VCRUNTIME140D.dll
ucrtbased.dll
KERNEL32.dll
Summary
1000 .00cfg
1000 .data
1000 .idata
8000 .rdata
2000 .reloc
1000 .rsrc
36000 .text
18000 .textbss
I have developed a react-native-windows WPF app targeting win7 machine. I developed this app on win10 with VS 2017 community edition. App works fine on my machine and teammate machine with VS development environment but it give the same error "Facebook.Yoga.YogaConfig threw an exception" when running on another non-dev machine of windows 7 and windows 10. Find below the dependents of yoga.dll and suggest do I need to copy "Universal CRT tools x86" on windows 7 machine as well:
Visual Studio 14.0\VC\bin\dumpbin.exe" /dependents yoga.dll
Microsoft (R) COFF/PE Dumper Version 14.00.24210.0
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file yoga.dll
File Type: DLL
Image has the following dependencies:
MSVCP140D.dll
VCRUNTIME140D.dll
ucrtbased.dll
KERNEL32.dll
Summary
1000 .00cfg
1000 .data
2000 .idata
5000 .pdata
12000 .rdata
1000 .reloc
1000 .rsrc
3C000 .text
1A000 .textbss
@markhomoki @ncomo11 Maybe the problem is with the D
(e.g., MSVCP140D.dll). Can you try running release builds on other machines? Perhaps the debug DLLs are only available if you have Visual Studio installed.
@rozele Thanks 馃憤 ,
Release build worked on my windows 7 non-development machine. Though I have to fix another issue while creating a release build which was already reported and luckily has a fix as well :
"ReactNative.Net46 project cannot be compiled with Release mode" - https://github.com/Microsoft/react-native-windows/issues/1819
Closing, as the issue was with Debug builds.
Hi, I am facing the issue in creating exe in Release Bundle mode. Its works fine in Debug mode. can someone please help me on the same.
Error Log:
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess.
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid [email protected]
15 verbose cwd D:\Users\anaanandDesktopAusnet-NVC-Code\CEOTMobile
16 verbose Windows_NT 6.1.7601
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
18 verbose node v8.11.3
19 verbose npm v5.6.0
20 error code ELIFECYCLE
21 error errno 11
22 error [email protected] start: node node_modules/react-native/local-cli/cli.js start
22 error Exit status 11
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 11, true ]
Have tried this:
https://github.com/Microsoft/react-native-windows/issues/1819
Hi Rozele, my exe does not work on wind 8.1, could you pls help me.
The same error occurs when we try to update for 0.52 to 0.55 version of react-native-windows. Because new version requires changes in VS solution files. We remove solution and run react-native windows command to generate new solution files. After that the problem was solved.
We can draw a conclusion from this. Good idea to have react-native-windows update
command same as in react-native or implement version migration guide to prevent same errors.
Most helpful comment
@markhomoki @ncomo11 Maybe the problem is with the
D
(e.g., MSVCP140D.dll). Can you try running release builds on other machines? Perhaps the debug DLLs are only available if you have Visual Studio installed.