New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: Your storage adapter does not inherit from the Storage Base. #7487

Closed
pascalandy opened this Issue Oct 5, 2016 · 11 comments

Comments

Projects
None yet
5 participants
@pascalandy

pascalandy commented Oct 5, 2016

Issue Summary

I know 0.10 brought a braking change for the s3 storage https://github.com/TryGhost/Ghost/wiki/Using-a-custom-storage-module

I now use this plug-in https://github.com/kelyvin/ghost-s3-service

Steps to Reproduce

  1. When starting Ghost
> docker logs --follow $ctnID
npm info it worked if it ends with ok
npm info using npm@2.15.9
npm info using node@v4.6.0
npm info prestart ghost@0.11.1
npm info start ghost@0.11.1

> ghost@0.11.1 start /usr/src/ghost
> node index


ERROR: Your storage adapter does not inherit from the Storage Base.

 Error
    at Error.IncorrectUsage (/usr/src/ghost/core/server/errors/incorrect-usage.js:3:18)
    at Object.getStorage (/usr/src/ghost/core/server/storage/index.js:54:15)
    at setupMiddleware (/usr/src/ghost/core/server/middleware/index.js:126:44)
    at /usr/src/ghost/core/server/index.js:188:9
    at tryCatcher (/usr/src/ghost/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:510:31)
    at Promise._settlePromise (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:567:18)
    at Promise._settlePromise0 (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:612:10)
    at Promise._settlePromises (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:691:18)
    at Promise._fulfill (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:636:18)
    at PromiseArray._resolve (/usr/src/ghost/node_modules/bluebird/js/release/promise_array.js:125:19)
    at PromiseArray._promiseFulfilled (/usr/src/ghost/node_modules/bluebird/js/release/promise_array.js:143:14)
    at Promise._settlePromise (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:572:26)
    at Promise._settlePromise0 (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:612:10)
    at Promise._settlePromises (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:691:18)
    at Async._drainQueue (/usr/src/ghost/node_modules/bluebird/js/release/async.js:138:16)
    at Async._drainQueues (/usr/src/ghost/node_modules/bluebird/js/release/async.js:148:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/usr/src/ghost/node_modules/bluebird/js/release/async.js:17:14)
    at processImmediate [as _immediateCallback] (timers.js:383:17)

npm info poststart ghost@0.11.1
npm info ok
root@01:~/deploy-setup#

Technical details:

  • Ghost Version: 0.11.1
  • Node Version: 4.6
  • Browser/OS: Ubuntu 16
  • Database: mysql
@pascalandy

This comment has been minimized.

pascalandy commented Oct 5, 2016

Here is the logs when I install the module

npm info it worked if it ends with ok
npm info using npm@2.15.9
npm info using node@v4.6.0
npm info addNameTag [ 'ghost-s3-service', 'latest' ]
npm info attempt registry request try #1 at 4:08:26 AM
npm http request GET https://registry.npmjs.org/ghost-s3-service
npm http 200 https://registry.npmjs.org/ghost-s3-service
npm info retry fetch attempt 1 at 4:08:26 AM
npm info attempt registry request try #1 at 4:08:26 AM
npm http fetch GET https://registry.npmjs.org/ghost-s3-service/-/ghost-s3-service-1.0.2.tgz
npm http fetch 200 https://registry.npmjs.org/ghost-s3-service/-/ghost-s3-service-1.0.2.tgz
npm info install ghost-s3-service@1.0.2 into /usr/src/ghost/content/storage/ghost-s3
npm info installOne ghost-s3-service@1.0.2
npm info preinstall ghost-s3-service@1.0.2
npm info attempt registry request try #1 at 4:08:27 AM
npm http request GET https://registry.npmjs.org/aws-sdk
npm info attempt registry request try #1 at 4:08:27 AM
npm http request GET https://registry.npmjs.org/aws-sdk-promise
npm info attempt registry request try #1 at 4:08:27 AM
npm http request GET https://registry.npmjs.org/bluebird
npm http 200 https://registry.npmjs.org/aws-sdk
npm info retry fetch attempt 1 at 4:08:27 AM
npm info attempt registry request try #1 at 4:08:27 AM
npm http fetch GET https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.6.6.tgz
npm http 200 https://registry.npmjs.org/bluebird
npm http fetch 200 https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.6.6.tgz
npm http 200 https://registry.npmjs.org/aws-sdk-promise
npm WARN deprecated aws-sdk-promise@0.0.2: stop using this library.  use a recent aws-sdk library instead.  note that you will need to stop looking at the .data property of return values
npm info retry fetch attempt 1 at 4:08:27 AM
npm info attempt registry request try #1 at 4:08:27 AM
npm http fetch GET https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz
npm info retry fetch attempt 1 at 4:08:27 AM
npm info attempt registry request try #1 at 4:08:27 AM
npm http fetch GET https://registry.npmjs.org/aws-sdk-promise/-/aws-sdk-promise-0.0.2.tgz
npm http fetch 200 https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz
npm http fetch 200 https://registry.npmjs.org/aws-sdk-promise/-/aws-sdk-promise-0.0.2.tgz
npm info install aws-sdk-promise@0.0.2 into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service
npm info install bluebird@2.11.0 into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service
npm info install aws-sdk@2.6.6 into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service
npm info installOne aws-sdk-promise@0.0.2
npm info installOne bluebird@2.11.0
npm info installOne aws-sdk@2.6.6
npm info preinstall aws-sdk-promise@0.0.2
npm info attempt registry request try #1 at 4:08:28 AM
npm http request GET https://registry.npmjs.org/promise
npm http 200 https://registry.npmjs.org/promise
npm info retry fetch attempt 1 at 4:08:28 AM
npm info attempt registry request try #1 at 4:08:28 AM
npm http fetch GET https://registry.npmjs.org/promise/-/promise-6.1.0.tgz
npm http fetch 200 https://registry.npmjs.org/promise/-/promise-6.1.0.tgz
npm info install promise@6.1.0 into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk-promise
npm info installOne promise@6.1.0
npm info preinstall promise@6.1.0
npm info attempt registry request try #1 at 4:08:29 AM
npm http request GET https://registry.npmjs.org/asap
npm http 200 https://registry.npmjs.org/asap
npm info retry fetch attempt 1 at 4:08:29 AM
npm info attempt registry request try #1 at 4:08:29 AM
npm http fetch GET https://registry.npmjs.org/asap/-/asap-1.0.0.tgz
npm http fetch 200 https://registry.npmjs.org/asap/-/asap-1.0.0.tgz
npm info install asap@1.0.0 into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk-promise/node_modules/promise
npm info installOne asap@1.0.0
npm info preinstall asap@1.0.0
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk-promise/node_modules/promise/node_modules/asap
npm info preinstall bluebird@2.11.0
npm info linkStuff asap@1.0.0
npm info install asap@1.0.0
npm info postinstall asap@1.0.0
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk-promise/node_modules/promise
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/bluebird
npm info linkStuff promise@6.1.0
npm info linkStuff bluebird@2.11.0
npm info install promise@6.1.0
npm info postinstall promise@6.1.0
npm info install bluebird@2.11.0
npm info postinstall bluebird@2.11.0
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk-promise
npm info linkStuff aws-sdk-promise@0.0.2
npm info install aws-sdk-promise@0.0.2
npm info postinstall aws-sdk-promise@0.0.2
npm info preinstall aws-sdk@2.6.6
npm info attempt registry request try #1 at 4:08:33 AM
npm http request GET https://registry.npmjs.org/jmespath
npm info attempt registry request try #1 at 4:08:33 AM
npm http request GET https://registry.npmjs.org/querystring
npm info attempt registry request try #1 at 4:08:33 AM
npm http request GET https://registry.npmjs.org/sax
npm info attempt registry request try #1 at 4:08:33 AM
npm http request GET https://registry.npmjs.org/url
npm info attempt registry request try #1 at 4:08:33 AM
npm http request GET https://registry.npmjs.org/xml2js
npm info attempt registry request try #1 at 4:08:33 AM
npm http request GET https://registry.npmjs.org/xmlbuilder
npm info attempt registry request try #1 at 4:08:33 AM
npm http request GET https://registry.npmjs.org/buffer
npm info attempt registry request try #1 at 4:08:33 AM
npm http request GET https://registry.npmjs.org/crypto-browserify
npm http 200 https://registry.npmjs.org/jmespath
npm http 200 https://registry.npmjs.org/querystring
npm http 200 https://registry.npmjs.org/sax
npm http 200 https://registry.npmjs.org/url
npm http 200 https://registry.npmjs.org/xmlbuilder
npm info retry fetch attempt 1 at 4:08:33 AM
npm info attempt registry request try #1 at 4:08:33 AM
npm http fetch GET https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz
npm http 200 https://registry.npmjs.org/crypto-browserify
npm info retry fetch attempt 1 at 4:08:33 AM
npm info attempt registry request try #1 at 4:08:33 AM
npm http fetch GET https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz
npm http 200 https://registry.npmjs.org/xml2js
npm http fetch 200 https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz
npm http 200 https://registry.npmjs.org/buffer
npm http fetch 200 https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz
npm info retry fetch attempt 1 at 4:08:33 AM
npm info attempt registry request try #1 at 4:08:33 AM
npm http fetch GET https://registry.npmjs.org/sax/-/sax-1.1.5.tgz
npm info retry fetch attempt 1 at 4:08:33 AM
npm info attempt registry request try #1 at 4:08:33 AM
npm http fetch GET https://registry.npmjs.org/url/-/url-0.10.3.tgz
npm http fetch 200 https://registry.npmjs.org/sax/-/sax-1.1.5.tgz
npm http fetch 200 https://registry.npmjs.org/url/-/url-0.10.3.tgz
npm info retry fetch attempt 1 at 4:08:33 AM
npm info attempt registry request try #1 at 4:08:33 AM
npm http fetch GET https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-2.6.2.tgz
npm info retry fetch attempt 1 at 4:08:33 AM
npm info attempt registry request try #1 at 4:08:33 AM
npm http fetch GET https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-1.0.9.tgz
npm http fetch 200 https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-2.6.2.tgz
npm info retry fetch attempt 1 at 4:08:33 AM
npm info attempt registry request try #1 at 4:08:33 AM
npm http fetch GET https://registry.npmjs.org/xml2js/-/xml2js-0.4.15.tgz
npm info retry fetch attempt 1 at 4:08:33 AM
npm info attempt registry request try #1 at 4:08:33 AM
npm http fetch GET https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz
npm http fetch 200 https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-1.0.9.tgz
npm http fetch 200 https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz
npm http fetch 200 https://registry.npmjs.org/xml2js/-/xml2js-0.4.15.tgz
npm info install querystring@0.2.0 into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk
npm info install jmespath@0.15.0 into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk
npm info install sax@1.1.5 into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk
npm info install url@0.10.3 into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk
npm info install xmlbuilder@2.6.2 into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk
npm info install xml2js@0.4.15 into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk
npm info install buffer@4.9.1 into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk
npm info install crypto-browserify@1.0.9 into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk
npm info installOne querystring@0.2.0
npm info installOne jmespath@0.15.0
npm info installOne sax@1.1.5
npm info installOne url@0.10.3
npm info installOne xmlbuilder@2.6.2
npm info installOne xml2js@0.4.15
npm info installOne buffer@4.9.1
npm info installOne crypto-browserify@1.0.9
npm info preinstall sax@1.1.5
npm info preinstall xml2js@0.4.15
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/sax
npm info preinstall url@0.10.3
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/xml2js
npm info linkStuff sax@1.1.5
npm info install sax@1.1.5
npm info linkStuff xml2js@0.4.15
npm info postinstall sax@1.1.5
npm info install xml2js@0.4.15
npm info postinstall xml2js@0.4.15
npm info attempt registry request try #1 at 4:08:34 AM
npm http request GET https://registry.npmjs.org/punycode
npm http 200 https://registry.npmjs.org/punycode
npm info retry fetch attempt 1 at 4:08:34 AM
npm info attempt registry request try #1 at 4:08:34 AM
npm http fetch GET https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz
npm info preinstall querystring@0.2.0
npm http fetch 200 https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/querystring
npm info install punycode@1.3.2 into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/url
npm info installOne punycode@1.3.2
npm info linkStuff querystring@0.2.0
npm info install querystring@0.2.0
npm info postinstall querystring@0.2.0
npm info preinstall xmlbuilder@2.6.2
npm info attempt registry request try #1 at 4:08:34 AM
npm http request GET https://registry.npmjs.org/lodash
npm info preinstall punycode@1.3.2
npm http 200 https://registry.npmjs.org/lodash
npm info retry fetch attempt 1 at 4:08:34 AM
npm info attempt registry request try #1 at 4:08:34 AM
npm http fetch GET https://registry.npmjs.org/lodash/-/lodash-3.5.0.tgz
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/url/node_modules/punycode
npm http fetch 200 https://registry.npmjs.org/lodash/-/lodash-3.5.0.tgz
npm info linkStuff punycode@1.3.2
npm info install punycode@1.3.2
npm info postinstall punycode@1.3.2
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/url
npm info linkStuff url@0.10.3
npm info install url@0.10.3
npm info postinstall url@0.10.3
npm info install lodash@3.5.0 into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/xmlbuilder
npm info installOne lodash@3.5.0
npm info preinstall jmespath@0.15.0
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/jmespath
npm info linkStuff jmespath@0.15.0
npm info install jmespath@0.15.0
npm info postinstall jmespath@0.15.0
npm info preinstall buffer@4.9.1
npm info attempt registry request try #1 at 4:08:35 AM
npm http request GET https://registry.npmjs.org/isarray
npm info attempt registry request try #1 at 4:08:35 AM
npm http request GET https://registry.npmjs.org/base64-js
npm info attempt registry request try #1 at 4:08:35 AM
npm http request GET https://registry.npmjs.org/ieee754
npm http 200 https://registry.npmjs.org/isarray
npm http 200 https://registry.npmjs.org/ieee754
npm http 200 https://registry.npmjs.org/base64-js
npm info retry fetch attempt 1 at 4:08:35 AM
npm info attempt registry request try #1 at 4:08:35 AM
npm http fetch GET https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz
npm info retry fetch attempt 1 at 4:08:35 AM
npm info attempt registry request try #1 at 4:08:35 AM
npm http fetch GET https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz
npm info retry fetch attempt 1 at 4:08:35 AM
npm info attempt registry request try #1 at 4:08:35 AM
npm http fetch GET https://registry.npmjs.org/base64-js/-/base64-js-1.2.0.tgz
npm http fetch 200 https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz
npm http fetch 200 https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz
npm http fetch 200 https://registry.npmjs.org/base64-js/-/base64-js-1.2.0.tgz
npm info install isarray@1.0.0 into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/buffer
npm info install ieee754@1.1.8 into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/buffer
npm info install base64-js@1.2.0 into /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/buffer
npm info installOne isarray@1.0.0
npm info installOne ieee754@1.1.8
npm info installOne base64-js@1.2.0
npm info preinstall ieee754@1.1.8
npm info preinstall isarray@1.0.0
npm info preinstall base64-js@1.2.0
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/buffer/node_modules/ieee754
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/buffer/node_modules/isarray
npm info linkStuff ieee754@1.1.8
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/buffer/node_modules/base64-js
npm info install ieee754@1.1.8
npm info linkStuff isarray@1.0.0
npm info postinstall ieee754@1.1.8
npm info install isarray@1.0.0
npm info postinstall isarray@1.0.0
npm info linkStuff base64-js@1.2.0
npm info install base64-js@1.2.0
npm info postinstall base64-js@1.2.0
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/buffer
npm info linkStuff buffer@4.9.1
npm info install buffer@4.9.1
npm info postinstall buffer@4.9.1
npm info preinstall crypto-browserify@1.0.9
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/crypto-browserify
npm info linkStuff crypto-browserify@1.0.9
npm info install crypto-browserify@1.0.9
npm info postinstall crypto-browserify@1.0.9
npm info preinstall lodash@3.5.0
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/xmlbuilder/node_modules/lodash
npm info linkStuff lodash@3.5.0
npm info install lodash@3.5.0
npm info postinstall lodash@3.5.0
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk/node_modules/xmlbuilder
npm info linkStuff xmlbuilder@2.6.2
npm info install xmlbuilder@2.6.2
npm info postinstall xmlbuilder@2.6.2
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service/node_modules/aws-sdk
npm info linkStuff aws-sdk@2.6.6
npm info install aws-sdk@2.6.6
npm info postinstall aws-sdk@2.6.6
npm info build /usr/src/ghost/content/storage/ghost-s3/node_modules/ghost-s3-service
npm info linkStuff ghost-s3-service@1.0.2
npm info install ghost-s3-service@1.0.2
npm info postinstall ghost-s3-service@1.0.2
ghost-s3-service@1.0.2 node_modules/ghost-s3-service
├── bluebird@2.11.0
├── aws-sdk-promise@0.0.2 (promise@6.1.0)
└── aws-sdk@2.6.6 (sax@1.1.5, xml2js@0.4.15, querystring@0.2.0, url@0.10.3, jmespath@0.15.0, buffer@4.9.1, crypto-browserify@1.0.9, xmlbuilder@2.6.2)
npm info ok
 ---> 611a7944cf16
@pascalandy

This comment has been minimized.

pascalandy commented Oct 5, 2016

Here in my config.js

        storage: {
            active: 'ghost-s3',
            'ghost-s3': {
                accessKeyId:     process.env.S3_ACCESS_KEY_ID,
                secretAccessKey: process.env.S3_ACCESS_SECRET_KEY,
                bucket:          process.env.S3_BUCKET_NAME,
                region:          process.env.S3_BUCKET_REGION,
                assetHost:       process.env.S3_ASSET_HOST_URL
            }
        },
@ErisDS

This comment has been minimized.

Member

ErisDS commented Oct 5, 2016

Hi @pascalandy, I see you already raised this over here: kelyvin/ghost-s3-service#1

I'd suggest it's a problem with either the module or how it's been installed. Ghost enforces restrictions to make sure the module you have is valid and will work once installed. Your current setup is failing that restriction. As it's not a bug, I'm going to close this. If you're looking for help getting it installed, please use the #help channel on slack.

Please note: we're working hard on solidifying the API and processes around adapters ready for Ghost 1.0, the current system is LTS, so if it needs a bug fix, it will be done, but we won't be making improvements.

@ErisDS ErisDS closed this Oct 5, 2016

@pascalandy

This comment has been minimized.

pascalandy commented Oct 5, 2016

Make sense. Thank you!

@marc101101

This comment has been minimized.

marc101101 commented Jan 24, 2017

@pascalandy do you have solution? I am running against the same problem :(
I am using the ghost-s3-storage-adapter

@pascalandy

This comment has been minimized.

pascalandy commented Jan 25, 2017

Sorry I give up.
I tried reeeaaly hard but at the end, I decided to mount the images folder to a storage object.

No more issues since.

@kirrg001

This comment has been minimized.

Contributor

kirrg001 commented Jan 25, 2017

@pascalandy Sorry to hear that and glad you found a way to fix it.
@marc101101 was able to fix this issue.

The problem is the following: If you have Ghost installed as sub dependency (ls -la node_modules/ghost), then the s3 adapter requires the base adapter from there. If not, it requires it from the project root.
https://github.com/kelyvin/ghost-s3-service/blob/master/index.js#L13

You need to ensure that the require path is the correct one.
If using Ghost as NPM module, it needs to be the path to the sub dependency.
If not, it needs to be the path to the project root.

We are using instanceof and this can fail, if the required file is a different one then we compare to.

We will work on getting rid of the dirty requires asap by outsourcing the base adapters into npm modules.

@pascalandy

This comment has been minimized.

pascalandy commented Jan 25, 2017

Thanks for the explanation @kirrg001

It will be great!

We will work on getting rid of the dirty requires asap by outsourcing the base adapters into npm modules.

@oligafner

This comment has been minimized.

oligafner commented Feb 1, 2017

@kirrg001 Ran into the same exact error but I'm not that familiar with npm and those dependencies. Could you please elaborate exactly the way you managed to fix this issue?

Thanks a lot!

@kirrg001

This comment has been minimized.

Contributor

kirrg001 commented Feb 2, 2017

Hey @oligafner Sorry to hear that.

Did you read and try my comment #7487 (comment)?
If you still need help, can you please swing by our slack channel and ask in the #help channel?

@oligafner

This comment has been minimized.

oligafner commented Feb 2, 2017

@kirrg001 figured it out! Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment