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

Error trying to deploy single function #128

Open
electric-al opened this issue Dec 3, 2021 · 1 comment
Open

Error trying to deploy single function #128

electric-al opened this issue Dec 3, 2021 · 1 comment

Comments

@electric-al
Copy link

Hi there.

Using version 4.2.1-rc.1 of serverless-optimizer-plugin and serverless versions:

Framework Core: 2.55.0 (local)
Plugin: 5.5.1
SDK: 4.3.0
Components: 3.18.1

Other plugins:

  - serverless-domain-manager
  - serverless-offline
  - serverless-plugin-optimize
  - serverless-iam-roles-per-function

Using:

sls deploy function -f <name> --stage=<stage>

Results in:

SyntaxError: Assigning to rvalue (1:62403) while parsing ***/serverless_sdk/index.js while parsing file: ***/serverless_sdk/index.js
      at DestroyableTransform.end [as _flush] (***:21)
      at DestroyableTransform.prefinish (***/_stream_transform.js:138:10)
      at DestroyableTransform.emit (events.js:400:28)
      at DestroyableTransform.emit (domain.js:470:12)
      at prefinish (***/node_modules/readable-stream/lib/_stream_writable.js:619:14)
      at finishMaybe (***/monorepo/node_modules/readable-stream/lib/_stream_writable.js:627:5)
      at endWritable (***/monorepo/node_modules/readable-stream/lib/_stream_writable.js:638:3)
      at DestroyableTransform.Writable.end (***/node_modules/readable-stream/lib/_stream_writable.js:594:41)
      at BabelifyStream.onend (internal/streams/readable.js:665:10)
      at Object.onceWrapper (events.js:519:28)
      at BabelifyStream.emit (events.js:400:28)
      at BabelifyStream.emit (domain.js:470:12)
      at endReadableNT (internal/streams/readable.js:1317:12)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)

However it works if we set optimise:false on the function (which is not ideal).

Any idea how to make it work without yml changes?

Also tried with latest serverless:

Serverless: Running "serverless" installed locally (in service node_modules)
Framework Core: 2.68.0 (local)
Plugin: 5.5.1
SDK: 4.3.0
Components: 3.18.1
@brandon-constratum
Copy link

anyone found a fix for this?

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

No branches or pull requests

2 participants