Skip to content

.NET Core + Chakra + Ubuntu can't find jsx file #355

Closed
@malachib

Description

@malachib

I am trying to learn from the tutorial (https://reactjs.net/getting-started/tutorial.html) and navigated my way around this issue #338 as it appears to apply to Ubuntu also. Now, it looks like it's almost working, but it appears the file path resolution is incorrect:

System.IO.FileNotFoundException: Could not find file '/home/malachi/Projects/notos.server/src/notos.server/notos.server.web/bin/Debug/netcoreapp1.0/wwwroot/home/malachi/Projects/notos.server/src/notos.server/notos.server.web/bin/Debug/netcoreapp1.0/wwwroot/js/tutorial.jsx'.

See how the path is doubling up? That doesn't seem quite right. I doublechecked the path from <script src="@Url.Content("~/js/tutorial.jsx")"></script> and it spits out <script src="/js/tutorial.jsx"></script> , which seems to be expected behavior.

On a related note, when I attempt to do anything with Debian, I get a different error:

Error initialising JavaScriptEngineSwitcher.ChakraCore.ChakraCoreJsEngineFactory: JavaScriptEngineSwitcher.Core.JsEngineLoadException: During loading of ChakraCoreJsEngine error has occurred.
	
See more details:

Unable to load DLL 'ChakraCore': The specified module could not be found.
 (Exception from HRESULT: 0x8007007E) ---> System.DllNotFoundException: Unable to load DLL 'ChakraCore': The specified module could not be found.
 (Exception from HRESULT: 0x8007007E)
   at JavaScriptEngineSwitcher.ChakraCore.JsRt.NativeMethods.JsCreateRuntime(JsRuntimeAttributes attributes, JsThreadServiceCallback threadService, JsRuntime& runtime)
   at JavaScriptEngineSwitcher.ChakraCore.ChakraCoreJsEngine..ctor(ChakraCoreSettings settings)
   --- End of inner exception stack trace ---
   at JavaScriptEngineSwitcher.ChakraCore.ChakraCoreJsEngine..ctor(ChakraCoreSettings settings)
   at JavaScriptEngineSwitcher.ChakraCore.ChakraCoreJsEngineFactory.CreateEngine()
   at React.JavaScriptEngineFactory.GetFactory(JsEngineSwitcher jsEngineSwitcher, Boolean allowMsie)
Loaded '/home/malachi/.nuget/packages/VroomJs/1.2.3/lib/netstandard1.6/VroomJs.dll'. Cannot find or open the symbol file.

Startup ConfigureServices code uses:

            services.AddReact();

            // also for ReactJS.net, explicitly using Chakra lib since default Vroom
            // isn't fully available except on Windows
            services.AddJsEngineSwitcher(options =>
                options.DefaultEngineName = ChakraCoreJsEngine.EngineName).
                    AddChakraCore();

            // Add framework services.
            services.AddMvc();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions