I am trying to deploy in production my app. It works fine on local environment but not in production
Expected behavior
I’ve created a smart field representing a pre signed url from AWS S3. Here’s the configuration :
collection(‘users’, {
actions: ,
fields: [{
field: “DOC ID”,
type: ‘String’,
get: async user => {
if (user?.identityDocuments[0]?.name) {
return await generatePreSignedUrlS3ForGet(user.identityDocuments[0].name, 300) //function used to generate a presigned URL from S3
} else {
return ‘-’
}
}
}],
segments: ,
});
This code works fine on local environment
Actual behavior
I’ve deployed the app on an Heroku instance. I have a log saying : “An error occured while computing the Forest schema. Your application schema cannot be synchronized with Forest. Your admin panel might not reflect your application models definition. Unexpected token ‘.’”
The ‘.’ points towards ‘user?.’ and I don’t understand why it is an unexpected token.
Context
- forest-express-mongoose: 6.7.2
- express: ~4.17.1
- mongoose: ~5.8.2