By Rémi
As soon I set the LOG_DESTINATIONS as per the doc here, my function stop working.
I’m getting the following error:
stderr: Command exited abruptly during initialization. stderr: The action did not initialize or run as expected. Log data might be missing.
I’m using Logtail with an HTTP source.
I’ve tried to set the LOG_DESTINATIONS environment variable through my project.yml and through the web interface. Same result.
And if I remove that environment variable, the function start to work again.
Any idea?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I faced the same problem as you did. To resolve it, avoid using any ES6 module syntax.
First, check your package.json file. If it includes "type": "module", remove this line.
Next, review the commands in your main file (e.g., index.js). For example, if you want to import mysql, use const mysql = require("mysql2/promise"); instead of import mysql from "mysql2/promise";. Similarly, if you want to export a function, use exports.main = main instead.
I hope this guidance proves helpful. Best of luck!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.