I’m trying out serverless run --debug
to investigate another problem (here’s my actual current error message) and noticed something odd – my serverless_framework version & node version don’t seem to match my serverless.yml specification.
Here’s some output from serverless run --debug
:
s:cli: {
node: 'v20.12.2',
os: 'linux',
arch: 'x64',
shell: '/bin/bash',
cwd: '/mnt/c/home/mtgpuzzles/puzzle-serverless',
nodeJsPath: '/root/.nvm/versions/node/v20.12.2/bin/node',
scriptPath: '/root/.serverless/releases/4.0.28/package/dist/sf-core.js',
scriptArgs: [ 'run', '--debug'],
logLevel: 'debug',
isInteractive: true
}
s:cli: { serverless_framework: '4.0.28' }
s:core: {
versions: { serverless_framework: '4.0.28' },
command: [ 'run' ],
options: { debug: 'puzzle-server' },
configFileDirPath: '/mnt/c/home/mtgpuzzles/puzzle-serverless',
customConfigFileName: null
}
s:main: Initializing
s:core:router: {
command: [ 'run' ],
options: { debug: 'puzzle-server' },
versions: { serverless_framework: '4.0.28' },
configFileDirPath: '/mnt/c/home/mtgpuzzles/puzzle-serverless',
isWithinCompose: false,
composeOrgName: null,
composeServiceName: null
}
and the relevant parts from my serverless.yml
file:
frameworkVersion: '3'
provider:
name: aws
runtime: nodejs18.x
As you can see, I specify frameworkVersion: '3'
in yml but the debug message says v4.0.28 & I specify nodejs18.x as runtime but cli says node ‘v20.12.2’ is being run.
Is my serverless.yml being ignored? Should I be running something other than just serverless run --debug
in the same folder as my serverless.yml? Or am I just misinterpreting the serverless debug logs?