#Installed Algolia according to docs - no search provider found on startup

14 messages · Page 1 of 1 (latest)

hallow peak
#

Install Algolia from the instructions in the docs.
When medusa is starting up I get:
Jul 23 16:04:14 --- heroku/web.1 State changed from starting to up
Jul 23 16:04:14 --- app/web.1 {"level":"warn","message":"No search engine provider was found: make sure to include a search plugin to enable searching","timestamp":"2023-07-24 11:04:13"}
I see the index got created on Algolia, but nothing is populating.

What is going wrong? I have everything in my medusa config and it still doesn't think I have the search plugin

hallow peak
#

anyone have any ideas on this one? This is my config:

resolve: medusa-plugin-algolia, options: { applicationId: process.env.ALGOLIA_APP_ID, adminApiKey: process.env.ALGOLIA_ADMIN_API_KEY, settings: { products: { indexSettings: { searchableAttributes: ["title", "description","variant_sku","tags"], attributesToRetrieve: [ "id", "title", "description", "handle", "thumbnail", "variants", "variant_sku", "options", "images", "tags", ], }, transformer: (product) => ({ id: product.id, title: product.title, description: product.description, handle: product.handle, thumbnail: product.thumbnail, variants: product.variants, variant_sku: product.variants && product.variants[0] ? product.variants[0].sku : null, options: product.options, images: product.images, tags: product.tags, }), }, }, },

sleek verge
#

Post your medusa.config file @hallow peak

hallow peak
#

const dotenv = require('dotenv')

let ENV_FILE_NAME = '';
switch (process.env.NODE_ENV) {
case 'production':
ENV_FILE_NAME = '.env.production';
break;
case 'staging':
ENV_FILE_NAME = '.env.staging';
break;
case 'test':
ENV_FILE_NAME = '.env.test';
break;
case 'development':
default:
ENV_FILE_NAME = '.env';
break;
}

try {
dotenv.config({ path: process.cwd() + '/' + ENV_FILE_NAME });
} catch (e) {
}

// CORS when consuming Medusa from admin
const ADMIN_CORS = process.env.ADMIN_CORS || "http://localhost:7000,http://localhost:7001";

// CORS to avoid issues when consuming Medusa from a client
const STORE_CORS = process.env.STORE_CORS || "http://localhost:8000";

// Database URL (here we use a local database called medusa-development)
const DATABASE_URL = process.env.DATABASE_URL || "postgres://localhost/medusa-store";

// Medusa uses Redis, so this needs configuration as well
const REDIS_URL = process.env.REDIS_URL || "redis://localhost:6379";

// Stripe keys
const STRIPE_API_KEY = process.env.STRIPE_API_KEY || "";
const STRIPE_WEBHOOK_SECRET = process.env.STRIPE_WEBHOOK_SECRET || "";

// This is the place to include plugins. See API documentation for a thorough guide on plugins.
const plugins = [
medusa-fulfillment-manual,
medusa-payment-manual,
// Uncomment to add Stripe support.
// You can create a Stripe account via: https://stripe.com
// {
// resolve: medusa-payment-stripe,
// options: {
// api_key: STRIPE_API_KEY,
// webhook_secret: STRIPE_WEBHOOK_SECRET,
// },
// },
{
resolve: medusa-file-spaces,
options: {
spaces_url: process.env.SPACE_URL,
bucket: process.env.SPACE_BUCKET,
endpoint: process.env.SPACE_ENDPOINT,
access_key_id: process.env.SPACE_ACCESS_KEY_ID,
secret_access_key: process.env.SPACE_SECRET_ACCESS_KEY,
},
},
{
resolve: medusa-plugin-algolia,
options: {
applicationId: process.env.ALGOLIA_APP_ID,
adminApiKey: process.env.ALGOLIA_ADMIN_API_KEY,
settings: {
products: {
indexSettings: {
searchableAttributes: ["title", "description","variant_sku","tags"],
attributesToRetrieve: [
"id",
"title",
"description",
"handle",
"thumbnail",
"variants",
"variant_sku",
"options",
"images",
"tags",
],
},
transformer: (product) => ({
id: product.id,
title: product.title,
description: product.description,
handle: product.handle,
thumbnail: product.thumbnail,
variants: product.variants,
variant_sku: product.variants && product.variants[0] ? product.variants[0].sku : null,
options: product.options,
images: product.images,
tags: product.tags,
}),
},
},
},
},
];

module.exports = {
projectConfig: {
redis_url: REDIS_URL,
database_url: DATABASE_URL,
database_type: "postgres",
store_cors: STORE_CORS,
admin_cors: ADMIN_CORS,
database_extra:
process.env.NODE_ENV !== "development"
? { ssl: { rejectUnauthorized: false } }
: {},
},
plugins,
modules: {
eventBus: {
resolve: "@medusajs/event-bus-redis",
options: {
redisUrl: REDIS_URL,
},
},
},
};

Stripe is a suite of APIs powering online payment processing and commerce solutions for internet businesses of all sizes. Accept payments and scale faster.

#

here's my full config file - thanks @sleek verge

sleek verge
#

@hallow peak dm'ed

sleek verge
#

Fixed by following past discord issues that had the same error

#

@hallow peak u can mark this as solve, 3 dots on top left then tags then solved

hallow peak
#

thank you!

kind temple
sleek verge
#

@kind temple search the error message "no search engine provider was found" in the discord, others faced it before, it's a package version issue

kind temple
sleek verge
#

@kind temple