Errors commiting migrations

I am having trouble committing some changes from a staging env back up to master. I am only committing schema changes, not custom functions.

First (not an error, just a warning) I get a message about a non-existing package-lock.json or yarn.lock. How do I generate these files?

Next, my migration fails on account of two files that appear to be prematurely truncated.

Error: “migrations/2022-02-25T17-28-06.863Z-data-createMany-AssessmentSummary.ts” (308,33): Unterminated string literal.
Error: “migrations/2022-04-24T21-30-04.529Z-data-createMany-Roles.ts” (268,5): ‘}’ expected.

These files are not part of the new changes I made in the Staging env. They were generated when I first cloned Master into Staging (it was a full clone including data).

I am not able to upload the .ts files, so I’m attaching a couple of images that show how the bottom of the files have been truncated.

Any idea how to fix this and how it got into this state to begin with?

Also are these ‘original’ migration files that were created when I cloned the env still necessary? Can I safely remove them if all I want to do is commit changes made since I created the Staging Env?

Note that the original clone worked well. Despite these migration files being incomplete, the data in the corresponding tables was cloned correctly.

In case anyone else has a similar issue, 8base support kindly enlightened me.

To generate package-lock.json simply run npm install in the 8base project directory.

With respect to the truncated files, there is a known bug with migration code file size > 10000 symbols, they will fix this in a near release.

Old migrations files which have been run successfully can be safely removed.