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

Throw error when webpack entry is configured and package individually is true #272

Closed
ceilfors opened this issue Nov 12, 2017 · 1 comment · Fixed by #271
Closed

Throw error when webpack entry is configured and package individually is true #272

ceilfors opened this issue Nov 12, 2017 · 1 comment · Fixed by #271
Milestone

Comments

@ceilfors
Copy link
Member

This is a Feature Proposal

Description

Context: When package individually is set to true, webpack entry should not be configured at all. This is currently the expected behaviour. It is however not explicit enough to the plugin user and it will fail with some other error.

Proposal: Throw an error when webpack entry is configured and package individually is set to true.

Related to:

Additional Data

  • Serverless-Webpack Version you're using:
    3.1.2

  • Webpack version you're using:
    3.5.5

  • Serverless Framework Version you're using:
    1.23.0

  • Operating System:
    OS X 10.10.5

  • Stack Trace (if available):

Type error:

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

  Path must be a string. Received [ 'babel-polyfill',
  'source-map-support/register',
  './packages/core/src/alexa-skill.js' ]

     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.


Stack trace:
  Stack Trace --------------------------------------------

TypeError: Path must be a string. Received [ 'babel-polyfill',
  'source-map-support/register',
  './packages/core/src/alexa-skill.js' ]
    at assertPath (path.js:28:11)
    at Object.relative (path.js:1248:5)
    at entryFunctions._.flatMap (/Users/ceilfors/github/realtime-ww2-alexa/node_modules/serverless-webpack/lib/validate.js:154:28)
    at /Users/ceilfors/github/realtime-ww2-alexa/node_modules/lodash/lodash.js:3554:27
    at /Users/ceilfors/github/realtime-ww2-alexa/node_modules/lodash/lodash.js:4944:15
    at baseForOwn (/Users/ceilfors/github/realtime-ww2-alexa/node_modules/lodash/lodash.js:3001:24)
    at /Users/ceilfors/github/realtime-ww2-alexa/node_modules/lodash/lodash.js:4913:18
    at baseMap (/Users/ceilfors/github/realtime-ww2-alexa/node_modules/lodash/lodash.js:3553:7)
    at map (/Users/ceilfors/github/realtime-ww2-alexa/node_modules/lodash/lodash.js:9571:14)
    at Function.flatMap (/Users/ceilfors/github/realtime-ww2-alexa/node_modules/lodash/lodash.js:9274:26)
    at ServerlessWebpack.validate (/Users/ceilfors/github/realtime-ww2-alexa/node_modules/serverless-webpack/lib/validate.js:153:31)
From previous event:
    at PluginManager.invoke (/Users/ceilfors/.nvm/versions/node/v8.1.2/lib/node_modules/serverless/lib/classes/PluginManager.js:360:22)
    at PluginManager.run (/Users/ceilfors/.nvm/versions/node/v8.1.2/lib/node_modules/serverless/lib/classes/PluginManager.js:391:17)
    at variables.populateService.then (/Users/ceilfors/.nvm/versions/node/v8.1.2/lib/node_modules/serverless/lib/Serverless.js:99:33)
    at runCallback (timers.js:800:20)
    at tryOnImmediate (timers.js:762:5)
    at processImmediate [as _immediateCallback] (timers.js:733:5)
From previous event:
    at Serverless.run (/Users/ceilfors/.nvm/versions/node/v8.1.2/lib/node_modules/serverless/lib/Serverless.js:86:74)
    at serverless.init.then (/Users/ceilfors/.nvm/versions/node/v8.1.2/lib/node_modules/serverless/bin/serverless:39:50)
    at <anonymous>
@HyperBrain HyperBrain added this to the 4.1.0 milestone Nov 12, 2017
@HyperBrain
Copy link
Member

Released with 4.1.0

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

Successfully merging a pull request may close this issue.

2 participants