http://coldfusion.com logo
#box-products
Title
# box-products
o

Ookma-Kyi

09/27/2022, 6:38 PM
Hello, I started working on my project and all of a sudden I am getting this error:
Copy code
CommandBox> migrate install



ERROR (5.5.2+00578)

Invalid Syntax Closing [}] not found


\modules\commandbox-migrations\models\BaseMigrationCommand.cfc: line 88
86:         // Check and see if a .cfmigrations.json file exists
87:         if ( fileExists( "#directory#/.cfmigrations.json" ) ) {
88:             variables.cfmigrationsInfo = deserializeJSON( fileRead( "#directory#/.cfmigrations.json" ) );
89:             variables.systemSettings.expandDeepSystemSettings( variables.cfmigrationsInfo );
90:             variables.cfmigrationsInfoType = "cfmigrations";
called from \modules\commandbox-migrations\models\BaseMigrationCommand.cfc: line 11
called from \modules\commandbox-migrations\commands\migrate\install.cfc: line 15
called from \system\services\CommandService.cfc: line 443
called from \system\services\CommandService.cfc: line 225
called from \system\Shell.cfc: line 819
called from \system\Shell.cfc: line 634
called from \system\Bootstrap.cfm: line 160

To enable full stack trace, run config set verboseErrors=true
I tried the following commands and neither fixed the issue:
install
migrate init
migrate install
migrate down
migrate up
Any ideas? None of the files related to migrations has been touched in awhile, so why it would have syntax errors is beyond me.
b

bdw429s

09/27/2022, 6:42 PM
@Ookma-Kyi According to the error, your
.cfmigrations.json
file has invalid JSON
Fix it and I assume you're error will go away!
I'm unclear why you tried running all those commands when the error clearly showed the deserializing of the JSON file was the issue.
o

Ookma-Kyi

09/27/2022, 6:42 PM
@bdw429s It's being created automatically when I run
migrate init
b

bdw429s

09/27/2022, 6:42 PM
I assume it will continue to error for as along as the JSON is invalid
If you want the error to go away, you will need to • identify why the JSON is wrong • fix it
And if the wrong JSON was auto-created for you, then I would enter a ticket with the steps to reproduce it
I'm not sure why you're showing me screenshots
Look in the actual JSON file and find the syntax error
That is your fix here
Not showing screenshots of the error that we've already discussed
o

Ookma-Kyi

09/27/2022, 6:44 PM
showing you the commands I'm running
To show I'm not creating the file myself
b

bdw429s

09/27/2022, 6:45 PM
lol, that's great, but it doesn't change anything I've already said
o

Ookma-Kyi

09/27/2022, 6:45 PM
and yea the auto-generator is broken
b

bdw429s

09/27/2022, 6:45 PM
• find the bad JSON • fix the bad JSON • enter a ticket with steps to re-create the bad JSON
Start with bullet #1
I don't really use migrations myself so the commands don't mean anything to me personally. You can include those details in your ticket.
I'm just telling you based on the error what the issue is
o

Ookma-Kyi

09/27/2022, 6:47 PM
How do you do database stuff then?
Found the error and fixed it. Now it works. Thanks! How do I open a ticket?
b

bdw429s

09/27/2022, 6:51 PM
I would assume in the Github repo, which is linked to from the ForgeBox listing https://github.com/commandbox-modules/commandbox-migrations/issues
b

bdw429s

09/27/2022, 7:19 PM
Cool, thx 👍
CC/ @elpete