question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update to 0.10.1 fails when using Ghost as an npm module (TypeError: _.toPairs)

See original GitHub issue

Issue Summary

2016-09-07T08:19:09.627945+00:00 app[web.1]: Migrations: Creating database backup
2016-09-07T08:19:09.687236+00:00 app[web.1]: 
2016-09-07T08:19:09.687239+00:00 app[web.1]: ERROR: undefined is not a function 
2016-09-07T08:19:09.687260+00:00 app[web.1]:     at getSettingsResult (/app/node_modules/ghost/core/server/api/settings.js:357:44)
2016-09-07T08:19:09.687281+00:00 app[web.1]:     at tryCatcher (/app/node_modules/ghost/node_modules/bluebird/js/release/util.js:16:23)
2016-09-07T08:19:09.687290+00:00 app[web.1]:     at Promise._settlePromise (/app/node_modules/ghost/node_modules/bluebird/js/release/promise.js:561:18)
2016-09-07T08:19:09.687290+00:00 app[web.1]:     at Promise._settlePromise0 (/app/node_modules/ghost/node_modules/bluebird/js/release/promise.js:606:10)
2016-09-07T08:19:09.687290+00:00 app[web.1]:     at Promise._settlePromises (/app/node_modules/ghost/node_modules/bluebird/js/release/promise.js:685:18)
2016-09-07T08:19:09.687291+00:00 app[web.1]:     at Async._drainQueue (/app/node_modules/ghost/node_modules/bluebird/js/release/async.js:138:16)
2016-09-07T08:19:09.756832+00:00 app[web.1]:     at Async._drainQueue (/app/node_modules/ghost/node_modules/bluebird/js/release/async.js:143:12)
2016-09-07T08:19:09.756834+00:00 app[web.1]:     at Immediate.Async.drainQueues (/app/node_modules/ghost/node_modules/bluebird/js/release/async.js:17:14)
2016-09-07T08:19:09.756837+00:00 app[web.1]:     at Immediate._onImmediate (/app/node_modules/@risingstack/trace/node_modules/continuation-local-storage/node_modules/async-listener/glue.js:188:31)
2016-09-07T08:19:09.757542+00:00 app[web.1]:     at Promise._settlePromise (/app/node_modules/ghost/node_modules/bluebird/js/release/promise.js:561:18)
2016-09-07T08:19:09.757542+00:00 app[web.1]:     at Promise._settlePromiseCtx (/app/node_modules/ghost/node_modules/bluebird/js/release/promise.js:598:10)
2016-09-07T08:19:09.757544+00:00 app[web.1]:     at Immediate.Async.drainQueues (/app/node_modules/ghost/node_modules/bluebird/js/release/async.js:17:14)

Steps to Reproduce

  1. Update to ghost@0.10.1

Technical details:

  • Ghost Version: 0.10.1
  • Node Version: 4.x
  • Browser/OS: Alpine
  • Database: Postgre

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:21 (19 by maintainers)

github_iconTop GitHub Comments

3reactions
kirkascommented, Sep 7, 2016

I’m having a very similar issue.

I’ve setup Ghost for my new blog. I use it as a NPM Module.

I recently updated the blog from 0.7 to 0.8 then 0.9 with no issue.

But when I updated Ghost to the latest version (0.10.1) I got an error error:

Unhandled rejection TypeError: _.toPairs is not a function
    at settingsFilter (/www/al-blog/node_modules/ghost/core/server/api/settings.js:112:35)
    at settingsResult (/www/al-blog/node_modules/ghost/core/server/api/settings.js:215:37)
    at /www/al-blog/node_modules/ghost/core/server/api/settings.js:361:28
    at tryCatcher (/www/al-blog/node_modules/ghost/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/www/al-blog/node_modules/ghost/node_modules/bluebird/js/release/promise.js:504:31)
    at Promise._settlePromise (/www/al-blog/node_modules/ghost/node_modules/bluebird/js/release/promise.js:561:18)
    at Promise._settlePromiseCtx (/www/al-blog/node_modules/ghost/node_modules/bluebird/js/release/promise.js:598:10)
    at Async._drainQueue (/www/al-blog/node_modules/ghost/node_modules/bluebird/js/release/async.js:143:12)
    at Async._drainQueues (/www/al-blog/node_modules/ghost/node_modules/bluebird/js/release/async.js:148:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/www/al-blog/node_modules/ghost/node_modules/bluebird/js/release/async.js:17:14)
    at processImmediate [as _immediateCallback] (timers.js:383:17)
Ghost has shut down

Your blog is now offline
Migrations: Creating database backup
Migrations: Database backup written to: /www/al-blog/content/data/ghost.2016-09-07.json
Migrations: Migration required from 006 to 007
Migrations: No tasks found for version
Migrations: Updating database to 007
Migrations: Running fixture updates
Skipping Migrations: rolling back because of: undefined
Ghost is running in production…

Spec:

Ghost Version: 0.7.8 Node Version: v4.4.2 NPM Version: 3.8.5 Browser/OS: All Database: MySql

2reactions
ErisDScommented, Sep 8, 2016

The correct workaround would be to require the overrides file inside of your version of the index.jsfile. I realise it is not ideal, but it should solve your problem without waiting for another release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sharp as a dependency of Ghost, install fails on upgrade #1941
One of our users is having problems getting sharp reinstalled after upgrading Node.js.
Read more >
Update from 5.22.10 failing - Bugs - Ghost Forum
I'm using 'ghost update --no-check-mem' because updates stopped working due to the memory check at some point. This has worked for a while...
Read more >
ghost - npm
Ghost is the most popular open source, headless Node. Ghost(Pro). The easiest way to get a production instance deployed is with our official...
Read more >
"npm start" gives error in ghost (node.js) - Stack Overflow
Try running npm install streamsearch. Does this work? This may be related: Cannot install packages using node package manager in Ubuntu.
Read more >
How to install Ghost.js on IBM Bluemix - Pomme::TAB
Ghost app fails to start. after finally deploying the Node.js app and the two dependant services (Mysql & Cloudant), Ghost still failed to ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found