Skip to content
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

Views directory is pointing to the wrong place #402

Open
olliechick opened this issue Jun 8, 2021 · 1 comment
Open

Views directory is pointing to the wrong place #402

olliechick opened this issue Jun 8, 2021 · 1 comment

Comments

@olliechick
Copy link
Contributor

I am running Arena as a middleware in a Nest app. When I run it and try to open the URL I have set it to, it raises this error. How do I fix this?

Failed to lookup view "dashboard/templates/queueList" in views directory "[my-repo]\dist\apps\bullmq-queue/views" +96993ms
Error: Failed to lookup view "dashboard/templates/queueList" in views directory "[my-repo]\dist\apps\bullmq-queue/views"
    at Function.render ([my-repo]\dist\apps\bullmq-queue\webpack:\apps\bullmq-queue\node_modules\express\lib\application.js:580:1)
    at ServerResponse.render ([my-repo]\dist\apps\bullmq-queue\webpack:\apps\bullmq-queue\node_modules\express\lib\response.js:1012:1)
    at handler ([my-repo]\dist\apps\bullmq-queue\webpack:\apps\bullmq-queue\node_modules\bull-arena\src\server\views\dashboard\queueList.js:6:1)
    at Layer.handle [as handle_request] ([my-repo]\dist\apps\bullmq-queue\webpack:\apps\bullmq-queue\node_modules\express\lib\router\layer.js:95:1)
    at next ([my-repo]\dist\apps\bullmq-queue\webpack:\apps\bullmq-queue\node_modules\express\lib\router\route.js:137:1)
    at Route.dispatch ([my-repo]\dist\apps\bullmq-queue\webpack:\apps\bullmq-queue\node_modules\express\lib\router\route.js:112:1)
    at Layer.handle [as handle_request] ([my-repo]\dist\apps\bullmq-queue\webpack:\apps\bullmq-queue\node_modules\express\lib\router\layer.js:95:1)
    at [my-repo]\dist\apps\bullmq-queue\webpack:\apps\bullmq-queue\node_modules\express\lib\router\index.js:281:1
    at Function.process_params ([my-repo]\dist\apps\bullmq-queue\webpack:\apps\bullmq-queue\node_modules\express\lib\router\index.js:335:1)
    at next ([my-repo]\dist\apps\bullmq-queue\webpack:\apps\bullmq-queue\node_modules\express\lib\router\index.js:275:1)

My main.ts looks like this:

import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';

async function bootstrap() {
	const app = await NestFactory.create(AppModule);
	const port = 3005;
	await app.listen(port);
}
bootstrap();

and app.module.ts looks like this:

import { MiddlewareConsumer, Module } from '@nestjs/common';
import Arena from 'bull-arena';
import { FlowProducer, Queue } from 'bullmq';

@Module({})
export class AppModule {
	configure(consumer: MiddlewareConsumer) {
		const arena = Arena(
			{
				BullMQ: Queue,
				FlowBullMQ: FlowProducer,
				queues: [
					{
						type: 'bullmq',

						// Name of the bullmq queue, this name must match up exactly with what you've defined in bullmq.
						name: 'queue_name',

						// Hostname or queue prefix, you can put whatever you want.
						hostId: 'worker',

						// Redis auth.
						redis: {
							host: '127.0.0.1',
							port: 6379,
							password: ''
						}
					}
				],
				flows: [
					{
						type: 'bullmq',

						// Name of the bullmq flow connection, this name helps to identify different connections.
						name: 'testConnection',

						// Hostname, you can put whatever you want.
						hostId: 'Flow',

						// Redis auth.
						redis: {
							host: '127.0.0.1',
							port: 6379,
							password: ''
						}
					}
				]
			},
			{ disableListen: true }
		);
		consumer.apply(arena).forRoutes('/system/queues');
	}
}

@bradvogel
Copy link
Contributor

I'm not sure what's happening there. Try checking out this project and running the bullmq example in directory https://github.com/bee-queue/arena/tree/master/example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants