play14team / strapi-plugin-map-field

Strapi plugin that provides a Mapbox custom field
MIT License
6 stars 3 forks source link

Mapbox access token not found #4

Open michael-scheurer opened 1 year ago

michael-scheurer commented 1 year ago

Hey. I'm using the latest strapi version (4.11.2) together with sqlite (for testing purpose). I followed your installation instructions. Everything is set-up, including the STRAPI_ADMIN_MAPBOX_ACCESS_TOKEN in the .env file. But in the strapi ui the following error message appears: "Mapbox access token not found" Any idea?

cpontet commented 1 year ago

The STRAPI_ADMIN_MAPBOX_ACCESS_TOKEN needs to be available to the admin panel. By default, Webpack will automatically package all variables starting with STRAPI_ADMIN_xxx. You should try to run a yarn build to force Webpack to rebuild the admin panel and therefore make sure the environment variable is visible. If this still does not work, maybe try to debug with yarn develop --watch-admin

claudiobgit commented 1 year ago

I notice the same behavior only when NODE_ENV=production on a staging server, but everything is working fine when in develop on localhost. Running on Strapi v4.11.7 with PostgreSQL.