-
Notifications
You must be signed in to change notification settings - Fork 926
Unable to resolve type: React.IReactEnvironment (no JsEngineSwitcher misconceptions!) #640
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
Comments
Hello, Adam! Today I also faced this error, when I was working on answer to this issue. I recommend you to read the “ReactJS.NET - Bundles - TinyIoCResolutionException: Unable to resolve type: React.IReactEnvironment” discussion on Stack Overflow. |
Hmm, I don't use the bundler code mentioned in those issues (my .jsx files are ran through Babel via the WebCompiler extension, then the bundles are generated by the BundlerMinifier extension and I also still get the same error if I don't include my local copies of the React libraries, and call |
@adamjford a few things to try..
|
@adamjford there isn't enough information to debug this further right now. We just added some better debugging support in the latest 4.0.0-rc2 package to re-throw specific engine exceptions instead, so that may be helpful here. |
Thank you for the list of things to try!
I'll try using the 4.0.0-rc2 version of the package and see if it helps. |
Unfortunately, running 4.0.0-rc2 didn't cause anything different to occur. Exact same exceptions occur, with no new InnerExceptions or anything. Guess I'm back to figuring out why |
In this case, you must verify that the |
Alright, I replaced my startup code with exactly this file in /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
using JavaScriptEngineSwitcher.Core;
using JavaScriptEngineSwitcher.V8;
[assembly: WebActivatorEx.PreApplicationStartMethod(typeof(React.Sample.Mvc4.ReactConfig), "Configure")]
namespace React.Sample.Mvc4
{
public static class ReactConfig
{
public static void Configure()
{
ReactSiteConfiguration.Configuration
.SetReuseJavaScriptEngines(true);
JsEngineSwitcher.Current.DefaultEngineName = V8JsEngine.EngineName;
JsEngineSwitcher.Current.EngineFactories.AddV8();
}
}
} Unfortunately, I still get the exact same exception as above. I'm starting to think something about how my project is set up is preventing |
Yesterday version 4.0.0 was released, which exactly included the “Save original exceptions as inner exceptions” pull request. |
Tried running 4.0.0, no change. |
Hi there,
Despite it working for a week or more beforehand, suddenly now getting these errors whenever I call a ReactJS.NET Html helper:
My application is an ASP.NET MVC 5 web app running in IIS 10.0.17763.1, and I have the following initialization code running at application start:
(The React bundle contains the React and ReactDOM libraries.)
I went around ReactJS.NET and attempted to render the components via
ReactDOM.render
, and they worked as expected, so it doesn't appear to be a problem with my bundles or scripts.As per the JSEngineSwitcher misconceptions (#409) article, I also have the JSEngineSwitcher V8.Native x86 package installed, I confirmed that
x64\ClearScriptV8-64.dll
andx64\v8-x64.dll
are being copied to mybin\
folder, and attempting to install the appropriate C++ redistributable gives me a message that I already have it installed. I've tried installing the x86 native package as well just in case, and no difference.Here are the versions of relevant packages I have installed:
Any ideas?
The text was updated successfully, but these errors were encountered: