Skip to content
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

Cannot read property 'browserify' of undefined #1

Open
dionysio opened this issue Nov 12, 2016 · 2 comments
Open

Cannot read property 'browserify' of undefined #1

dionysio opened this issue Nov 12, 2016 · 2 comments

Comments

@dionysio
Copy link

I have installed your plugin, enabled it in my serverless.yml. I have not used any custom configuration and this happens on deployment:

Serverless: SlsBrowserify::validate
Serverless: SlsBrowserify::globalConfig

  Type Error ---------------------------------------------

     Cannot read property 'browserify' of undefined

     For debugging logs, run again after setting SLS_DEBUG env var.

  Stack Trace --------------------------------------------

TypeError: Cannot read property 'browserify' of undefined
    at SlsBrowserify.globalConfig (/usr/local/lib/node_modules/serverless-plugin-browserify/lib/configure.js:15:56)
    at SlsBrowserify.tryCatcher (/usr/local/lib/node_modules/serverless-plugin-browserify/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/serverless-plugin-browserify/node_modules/bluebird/js/release/promise.js:510:31)
    at Promise._settlePromise (/usr/local/lib/node_modules/serverless-plugin-browserify/node_modules/bluebird/js/release/promise.js:567:18)
    at Promise._settlePromise0 (/usr/local/lib/node_modules/serverless-plugin-browserify/node_modules/bluebird/js/release/promise.js:612:10)
    at Promise._settlePromises (/usr/local/lib/node_modules/serverless-plugin-browserify/node_modules/bluebird/js/release/promise.js:691:18)
    at Async._drainQueue (/usr/local/lib/node_modules/serverless-plugin-browserify/node_modules/bluebird/js/release/async.js:138:16)
    at Async._drainQueues (/usr/local/lib/node_modules/serverless-plugin-browserify/node_modules/bluebird/js/release/async.js:148:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/lib/node_modules/serverless-plugin-browserify/node_modules/bluebird/js/release/async.js:17:14)
    at processImmediate [as _immediateCallback] (timers.js:383:17)

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues

     Please report this error. We think it might be a bug.

  Your Environment Information -----------------------------
     OS:                 linux
     Node Version:       4.2.6
     Serverless Version: 1.1.0
@thomers
Copy link

thomers commented Jan 11, 2017

I'm having the same problem, using it on the unmodified aws-node-rest-api-with-dynamodb example.

 Node Version:       6.9.1
 Serverless Version: 1.5.0

@predescu
Copy link

predescu commented Feb 7, 2017

a workaround is to add into serverless.yml

custom:
  browserify:

probably the solution is to change lib/configure.js on line 15 to check if this.serverless.service.custom is defined or not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants