I try to export my prefab with some scripts to another project. but doing so it exports the whole project. Also I get a whole bunch of errors when exporting it, like it did not imported the required packages (even though MLagents is is intalled on the other Unity project).
when exporting anything to another project, i usually:
select the prefab in project window,
then do select dependencies,
then select export package,
then uncheck include dependencies (otherwise almost everything gets included…)