NAME: MigrationScriptError MESSAGE: ENOENT: no such file or directory, open '/home/ghost-2.0.2/content/settings/routes.yaml'

I do upgrade from 1.25.5 to 2.0.2 and got this error:

[2018-08-21 10:25:22] INFO Creating database backup
[2018-08-21 10:25:24] INFO Database backup written to: /ghost-2.0.2/content/data/my-db.ghost.2018-08-21.json
[2018-08-21 10:25:24] INFO Renaming column amp to comment_id
[2018-08-21 10:25:25] INFO Renamed column amp to comment_id
[2018-08-21 10:25:26] INFO Updating posts: apply new editor format and set comment_id field.
[2018-08-21 10:25:32] INFO Updated posts: apply new editor format and set comment_id field.
[2018-08-21 10:25:32] INFO Removing koenigEditor from labs.
[2018-08-21 10:25:33] INFO Removed koenigEditor from labs.
[2018-08-21 10:25:33] INFO Removing globals.permalinks from routes.yaml.
[2018-08-21 10:25:33] INFO Rollback: Removing globals.permalink from routes.yaml. Nothing todo.
[2018-08-21 10:25:33] WARN Skip Rollback: Removing globals.permalinks from routes.yaml. Nothing todo.
[2018-08-21 10:25:33] WARN Rollback: Please re-enable König Beta if required. We can’t rollback this change.
[2018-08-21 10:25:33] INFO Rollback: Updating posts: use old editor format
[2018-08-21 10:25:36] INFO Rollback: Updated posts: use old editor format
[2018-08-21 10:25:37] WARN Rollback: Renaming column comment_id to amp
[2018-08-21 10:25:37] WARN Rollback: Renamed column comment_id to amp
[2018-08-21 06:25:38] ERROR

[object Object]
Error occurred while executing the following migration: 4-permalink-setting.js
MigrationScriptError: ENOENT: no such file or directory, open ‘/ghost-2.0.2/content/settings/routes.yaml’
at MigrationScriptError.KnexMigrateError (/ghost-2.0.2/node_modules/knex-migrator/lib/errors.js:7:26)
at new MigrationScriptError (/ghost-2.0.2/node_modules/knex-migrator/lib/errors.js:26:26)
at /ghost-2.0.2/node_modules/knex-migrator/lib/index.js:636:19
at tryCatcher (/ghost-2.0.2/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/ghost-2.0.2/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/ghost-2.0.2/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/ghost-2.0.2/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/ghost-2.0.2/node_modules/bluebird/js/release/promise.js:689:18)
at Async._drainQueue (/ghost-2.0.2/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/ghost-2.0.2/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/ghost-2.0.2/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:810:20)
at tryOnImmediate (timers.js:768:5)
at processImmediate [as _immediateCallback] (timers.js:745:5)

Error: ENOENT: no such file or directory, open ‘/ghost-2.0.2/content/settings/routes.yaml’

Are you using the Ghost-CLI to update/install your Ghost blog?

Furthermore, it looks like you have mis-configured your content folder? Please take a look at our docs and report back.

Both, Ghost and the CLI take care that the folder structure in the content folder get’s created correctly.

No, I don’t use Ghost-CLI. I use yarn and knex-migrator to upgrade.

In my setting.json also has:

"paths": {
    "contentPath": "content/"
},

We highly recommend using the CLI for installing/updating Ghost.

If you start your 1.25.5 blog, Ghost will create the settings folder for you.

Because I run on Google AppEngine. There is no way to install/upgrade by Ghost-CLI, or I don’t know the way to do.

So how can I upgrade now?

^

Sure. The folder was created. But there is not found file routes.yaml inside. I don’t create it because there is no file like that. I think the knex-migrator will create it while upgrading, doesn’t it?

If you start your 1.25.5 blog, Ghost will create the settings folder and the default routes.yaml file.

If it doesn’t, maybe there is a permission problem on your server?

When I did upgrade from 1.25.4 to 1.25.5, the same procedure:

  • yarn install
  • knex-migrator migrate

And the upgrading success, but no file routes.yaml was created. The folder was created also.

Is there anyway to create routes.yaml manual?

And I don’t think that any issue from permission. Because reading the upgrading log. There was another file that was created success:

[2018-08-21 10:25:24] INFO Database backup written to: /ghost-2.0.2/content/data/my-db.ghost.2018-08-21.json

Yeah sure, you can create the file manually, see docs.

But still: i have just tested this. If you start your 1.25.5 blog, Ghost ensures that content/settings/routes.yaml exists and if it doesn’t, it creates this file.

I’m sure that the procedure to do upgrade as below from 1.25.4 to 1.25.5

  • Download 1.25.5 version
  • Extract and build libraries via yarn install at local
  • Upgrade database via knex-migrator via mysql proxy
  • Deploy to Google AppEngine

There is no error, and no file routes was created. I keep the local and do double check.

Strange.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.