All of a sudden, CircleCI fails to deploy my serverless-component application.
It used to run and deploy OK. But now, my CircleCI script refuses to deploy.
The log shows the following error:
Command failed: npm install @sls-next/serverless-component@1.17.0 --prefix /home/circleci/.serverless/components/registry/npm/@sls-next/serverless-component@1.17.0
npm ERR! code ENOENT
npm ERR! syscall lstat
npm ERR! path /home/circleci/.serverless/components/registry/npm/@sls-next
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, lstat ‘/home/circleci/.serverless/components/registry/npm/@sls-next’
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/circleci/.npm/_logs/2020-10-25T16_19_46_401Z-debug.log
at ChildProcess.exithandler (node:child_process:309:12)
at ChildProcess.emit (node:events:327:20)
at maybeClose (node:internal/child_process:1048:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:288:5) {
killed: false,
code: 254,
signal: null,
cmd: ‘npm install @sls-next/serverless-component@1.17.0 --prefix /home/circleci/.serverless/components/registry/npm/@sls-next/serverless-component@1.17.0’,
stdout: ‘’,
stderr: ‘npm ERR! code ENOENT\n’ +
‘npm ERR! syscall lstat\n’ +
‘npm ERR! path /home/circleci/.serverless/components/registry/npm/@sls-next\n’ +
‘npm ERR! errno -2\n’ +
“npm ERR! enoent ENOENT: no such file or directory, lstat ‘/home/circleci/.serverless/components/registry/npm/@sls-next’\n” +
‘npm ERR! enoent This is related to npm not being able to find a file.\n’ +
‘npm ERR! enoent \n’ +
‘\n’ +
‘npm ERR! A complete log of this run can be found in:\n’ +
‘npm ERR! /home/circleci/.npm/_logs/2020-10-25T16_19_46_401Z-debug.log\n’
}
Strangely, I can execute all commands locally just fine, including successful deployment.
Am I missing something?
What could be going wrong here?
Thanks in advance for ideas on how to debug/solve!