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.
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:
Node.js version: Tried 16 and 19.
npm version: 9.2.0
TypeScript version: 5.2.2
Steps to Reproduce:
Clone the repository.
Install dependencies using npm install.
Run the build command using npm run build.
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:
I tried many ways to solve it by changing the node version and deleting the node_modules folder + package-lock.json everytime and run npm install but still the same issue.
Please let me know if you need any further assistance or have any specific details to add to the issue description.
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:
npm install
.npm run build
.Error Messages: server/bootstrap.ts:13:14 - error TS18048: 'strapi.db' is possibly 'undefined'. const db = strapi.db.connection;
Troubleshooting Steps Taken:
npm install
but still the same issue.Please let me know if you need any further assistance or have any specific details to add to the issue description.