notum-cz / strapi-plugin-location

This plugin allows users to create location inputs and store latitude and longitude values as geometry types in a PostGIS database. It also provides functionality to filter items based on their location.
MIT License
24 stars 13 forks source link

Errors in Plugin Build #79

Closed Ademboussetha closed 11 months ago

Ademboussetha commented 11 months ago

Description:

When attempting to build the Strapi plugin "strapi-plugin-location" using the command npm run build, I encounter TypeScript errors that indicate 'strapi.db' is possibly undefined.

Environment:

Steps to Reproduce:

  1. Clone the repository.
  2. Install dependencies using npm install.
  3. Run the build command using npm run build.
  4. Observe the TypeScript errors.

Error Messages: server/bootstrap.ts:13:14 - error TS18048: 'strapi.db' is possibly 'undefined'. const db = strapi.db.connection;

Troubleshooting Steps Taken:

image

Please let me know if you need any further assistance or have any specific details to add to the issue description.

omikulcik commented 11 months ago

Hey @Ademboussetha, I have uploaded a fix. Strapi must have changed their typings so we will have to settle for ts-expect-errors now...