Error running projections in embedded mode

Are projections supported in embedded mode? When I run a projection in embedded node (doesn’t matter if its single or a cluster node) the projection gets into a faulted state with this error:
Could not find a part of the path ‘E:\Projects\ESEmbedded\bin\Debug\Prelude\1Prelude.js’

Code running embedded single node:

var node = EmbeddedVNodeBuilder.AsSingleNode()

.RunProjections(ProjectionsMode.All)

.WithInternalTcpOn(new IPEndPoint(IPAddress.Loopback, 1112))

.WithExternalHttpOn(new IPEndPoint(IPAddress.Loopback, 1113))

.WithInternalHttpOn(new IPEndPoint(IPAddress.Loopback, 2112))

.WithExternalHttpOn(new IPEndPoint(IPAddress.Loopback, 2114))

.AddHttpPrefix(“http://+:2114/”)

.Build();

node.Start();

Sample projection:

var mgr = new ProjectionsManager(new ConsoleLogger(), new IPEndPoint(IPAddress.Loopback, 2114), TimeSpan.FromSeconds(1));

var projection = @"

fromAny().when({

TestEvent: function(state, event) {

linkTo(‘stream-’ + event.data.stream, event);

}

})

";

mgr.CreateContinuousAsync(“TestProjection”, projection, credentials).Wait();

mgr.ListAllAsync().Result

Cheers,

Ritesh.

You have to tie the, in yourself when running embedded mode. You found the .runprojections. There are then some things that need to be setup like paths etc that have to point to where things live (like prelude.js) and js1.dll unmanaged. Are you including this stuff?

No, are there any resources/docs on what these additional paths are?

As of now just source as its kind of a super advanced use case. We also dont version semantically our internal things there as a heads up.

Not exposed in builder it needs to be on that path as of now https://github.com/EventStore/EventStore/blob/dev/src/EventStore.ClientAPI.Embedded/EmbeddedVNodeBuilder.cs#L609

Btw i can make that condigurable

It looks like since 3.0.3 the nuget package doesn’t inclue the Prelude scripts by default. It used to at least for 3.0.1 last time I checked and that’s what was missing :frowning: Adding the Prelude folder and scripts made things work.

It would be nice to have the path to Prelude configurable though.

Cheers,

Ritesh.

Ill get that done for next release

https://github.com/EventStore/EventStore/issues/442

Tracked here

Great, thanks!