serverless-step-functions icon indicating copy to clipboard operation
serverless-step-functions copied to clipboard

Running "serverless" from node_modules after installation

Open mofolo opened this issue 3 years ago • 1 comments

This is a (Bug Report / Feature Proposal)

Bug Report

Description

After installing the dependency into the project all invokes show

Running "serverless" from node_modules

This causes an issue with the AWS Profile being loaded

In the Yaml: profile: profile2

Profile 2 appears to be "loaded" but when you check the Credential token using

AWS.config.getCredentials(function (err) {
  if (err) console.log(err.stack);
  // credentials not loaded
  else {
    console.log("Access key:", AWS.config.credentials.accessKeyId);
  }
});

It returns the "default" AWS token. This causes a whole bunch of errors within a project that works perfectly without the plugin.

Removing the plugin fixes these issues.

Additional Data

  • Serverless Framework Core Version you're using: Framework Core: 3.26.0 (local) 3.7.1 (global) Plugin: 6.2.2 SDK: 4.3.2
  • The Plugin Version you're using: 3.11.1

mofolo avatar Jan 03 '23 01:01 mofolo

I forked a version of this without the serverless Peer-dependency in the package.json and this issue was resolved.

Maybe something to look into? https://github.com/mofolo/serverless-step-functions-without-serverless

mofolo avatar Jan 03 '23 12:01 mofolo