Giter Site home page Giter Site logo

kontent-ai / integration-example-algolia Goto Github PK

View Code? Open in Web Editor NEW
4.0 18.0 2.0 7.96 MB

Example implementation of integration between Algolia search engine and Kontent.ai.

License: MIT License

HTML 0.36% TypeScript 18.88% CSS 80.76%
integration algolia search headless-cms kontent-ai kontent-ai-integration hacktoberfest

integration-example-algolia's People

Contributors

jirilojda avatar kontent-ai-bot avatar pokornyd avatar simply007 avatar strizr avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

integration-example-algolia's Issues

Invalid Config

Brief bug description

Have set up the config in Kontent.ai as specified in the readme, but the custom element throws " Invalid element config, the following properties are missing or invalid 0, 1, 2, 3, 4, 5."

Repro steps

  1. Set up Custom Element via Quick Deploy
  2. Set up custom element configuration in Kontent.ai
  3. Open the Item with the custom Element in Kontent.ai

Expected behavior

Validate element.config if correct, or point out specifically what properties of the config are invalid.

Additional context

config used {
"language": "es-us",
"projectId": "f9b63f57-16fd-0094-e757-2f72d2321c5f",
"algoliaAppId": "VG5LKCBKWQ",
"algoliaSearchKey": "ae3750d4df514f9bf3410909ed4d81c2",
"algoliaIndexName": "Final_Test",
"slugCodename": "url_slug"
}

Screenshots

image

Multiple indexes in Algolia

Motivation

Nicholas from Kontent.ai support suggested I submit a feature request.

Proposed solution

The feature request is to sync content from one Kontnet.ai site to more than one Algolia index. We want to have the same data in two different indexes in Algolia. One index would be for development (sandbox) and the other index would be for production.

Error message is not descriptive

Motivation

Why is this feature required? What problems does it solve?

Error message: "Some environment variables are missing. Please check the documentation" is not informative to developers. When the error is displayed in the webhook dashboard, they find it challenging to look for resources to help themselves.

Proposed solution

Better error message. Like what exactly is missing would help.

Suggestions:
Environment variables are missing. Please add kontent secret and algolia API key.

Additional context

None

Index initialization Issue

Brief bug description

Running the index initialization give me "Missing or invalid body, please check the documentation" and the index doesn't get created.

Repro steps

In postman I attempt to run the index initialization and pass it the required parameters. The only response I get is "Missing or invalid body, please check the documentation", No errors Netlify.

Expected behavior

What is the correct behavior?

Test environment

  • Platform/OS: [e.g. .NET Core 2.1, iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context

I worked with Kontent.ai support and we couldn't get it resolved.

Screenshots

Add links to screenshots, if possible.

Error: Cannot find module 'esbuild'

Brief bug description

Failing to install esbuild and to find package "@netlify/esbuild-windows-64" on the file system. Deployments to Netlify via Quick Deploy are failing for similar reason.

Repro steps

  1. Download Local Clone
  2. Run npm Install

Alternatively

  1. Use "Deploy to Netlify" Button

Expected behavior

Deploy to Netlify via quick deploy.

Additional context

Deploy Log

9:45:02 AM: build-image version: 5ad27658ebdf9c1e4379d77be303c2a3e3daa7bf (focal)
9:45:02 AM: buildbot version: 5ad27658ebdf9c1e4379d77be303c2a3e3daa7bf
9:45:02 AM: Fetching cached dependencies
9:45:02 AM: Failed to fetch cache, continuing with build
9:45:02 AM: Starting to prepare the repo for build
9:45:02 AM: No cached dependencies found. Cloning fresh repo
9:45:02 AM: git clone --filter=blob:none https://github.com/kontent-ai/integration-example-algolia
9:45:03 AM: Preparing Git Reference refs/heads/main
9:45:04 AM: Parsing package.json dependencies
9:45:05 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'build' versus '/build' in the Netlify UI
9:45:05 AM: Starting build script
9:45:05 AM: Installing dependencies
9:45:05 AM: Python version set to 2.7
9:45:05 AM: v16.19.1 is already installed.
9:45:06 AM: Now using node v16.19.1 (npm v8.19.3)
9:45:06 AM: Enabling Node.js Corepack
9:45:06 AM: Started restoring cached build plugins
9:45:06 AM: Finished restoring cached build plugins
9:45:06 AM: Attempting Ruby version 2.7.2, read from environment
9:45:06 AM: Using Ruby version 2.7.2
9:45:07 AM: Using PHP version 8.0
9:45:07 AM: Started restoring cached corepack dependencies
9:45:07 AM: Finished restoring cached corepack dependencies
9:45:07 AM: No npm workspaces detected
9:45:07 AM: Started restoring cached node modules
9:45:07 AM: Finished restoring cached node modules
9:45:07 AM: Installing npm packages using npm version 8.19.3
9:45:44 AM: npm ERR! code 1
9:45:44 AM: npm ERR! path /opt/build/repo/node_modules/netlify-cli/node_modules/@netlify/esbuild
9:45:44 AM: npm ERR! command failed
9:45:44 AM: npm ERR! command sh -c -- node install.js
9:45:44 AM: npm ERR! [esbuild] Failed to find package "@netlify/esbuild-linux-64" on the file system
9:45:44 AM: npm ERR!
9:45:44 AM: Failed during stage 'building site': Build script returned non-zero exit code: 1 (https://ntl.fyi/exit-code-1)
9:45:44 AM: npm ERR! This can happen if you use the "--no-optional" flag. The "optionalDependencies"
9:45:44 AM: npm ERR! package.json feature is used by esbuild to install the correct binary executable
9:45:44 AM: npm ERR! for your current platform. This install script will now attempt to work around
9:45:44 AM: npm ERR! this. If that fails, you need to remove the "--no-optional" flag to use esbuild.
9:45:44 AM: npm ERR!
9:45:44 AM: npm ERR! node:internal/modules/cjs/loader:1021
9:45:44 AM: npm ERR! const err = new Error(message);
9:45:44 AM: npm ERR! ^
9:45:44 AM: npm ERR!
9:45:44 AM: npm ERR! Error: Cannot find module 'esbuild'
9:45:44 AM: npm ERR! Require stack:
9:45:44 AM: npm ERR! - /opt/build/repo/node_modules/netlify-cli/node_modules/@netlify/esbuild/install.js
9:45:44 AM: npm ERR! at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1021:15)
9:45:44 AM: npm ERR! at Function.resolve (node:internal/modules/cjs/helpers:114:19)
9:45:44 AM: npm ERR! at downloadedBinPath (/opt/build/repo/node_modules/netlify-cli/node_modules/@netlify/esbuild/install.js:86:46)
9:45:44 AM: npm ERR! at checkAndPreparePackage (/opt/build/repo/node_modules/netlify-cli/node_modules/@netlify/esbuild/install.js:232:15)
9:45:44 AM: npm ERR! at Object. (/opt/build/repo/node_modules/netlify-cli/node_modules/@netlify/esbuild/install.js:247:1)
9:45:44 AM: npm ERR! at Module._compile (node:internal/modules/cjs/loader:1191:14)
9:45:44 AM: npm ERR! at Object.Module._extensions..js (node:internal/modules/cjs/loader:1245:10)
9:45:44 AM: npm ERR! at Module.load (node:internal/modules/cjs/loader:1069:32)
9:45:44 AM: npm ERR! at Function.Module._load (node:internal/modules/cjs/loader:904:12)
9:45:44 AM: npm ERR! at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
9:45:44 AM: npm ERR! code: 'MODULE_NOT_FOUND',
9:45:44 AM: npm ERR! requireStack: [
9:45:44 AM: npm ERR! '/opt/build/repo/node_modules/netlify-cli/node_modules/@netlify/esbuild/install.js'
9:45:44 AM: npm ERR! ]
9:45:44 AM: npm ERR! }
9:45:44 AM: npm ERR! A complete log of this run can be found in:
9:45:44 AM: npm ERR! /opt/buildhome/.npm/_logs/2023-02-28T17_45_07_535Z-debug-0.log
9:45:44 AM: Error during npm install
9:45:44 AM: Build was terminated: Build script returned non-zero exit code: 1
9:45:44 AM: Failing build: Failed to build site
9:45:45 AM: Finished processing build request in 43.338s

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.