You need to import the env function in order to access it
const { env } = require("@strapi/utils");
module.exports = {
beforeCreate(event) {
const myEnv = env("MY_ENV_VAR");
console.log("MY_ENV_VAR: ", myEnv);
console.log("before create fired with data: ", event.params.data);
},
};