agutoli / serverless-layers

Serverless.js plugin implementing AWS Lambda Layers, reducing lambda size, warm-up, and deployment time.
MIT License
230 stars 54 forks source link

Error when deploying through Azure Pipeline Worker - ENOENT Error #137

Open dmirandaapm opened 1 year ago

dmirandaapm commented 1 year ago

Hello everyone.

I've been wresting with this issue for some months, I stopped using the plugin because of it and decided to give it another trial recently.

When using a Azure Pipeline Worker with a MAC Os Image, the same system I use for my development environment, after running the sls deploy command, I get the following result.

2023-02-01T23:03:48.9246000Z ... ○ Downloading ./package.json from bucket...
2023-02-01T23:03:49.2378110Z ... ○ ./package.json The specified key does not exist..
2023-02-01T23:03:49.5874970Z ... ○  Changes identified ! Re-installing...
2023-02-01T23:03:49.5976180Z ... ∅ [warning] ".npmrc" file does not exists!
2023-02-01T23:03:49.6078420Z ... ∅ [warning] "yarn.lock" file does not exists!
2023-02-01T23:03:49.6179660Z ... ○ npm install --production --only=prod 
2023-02-01T23:03:51.9443610Z npm WARN config production Use `--omit=dev` instead.
2023-02-01T23:03:51.9546100Z npm WARN config only Use `--omit=dev` to omit dev dependencies from the install.
2023-02-01T23:03:51.9647380Z npm ERR! code ENOENT
2023-02-01T23:03:51.9749310Z npm ERR! syscall open
2023-02-01T23:03:51.9850300Z npm ERR! path /Users/runner/work/r1/a/deploy/.serverless/layers/nodejs/lib/package.json
2023-02-01T23:03:51.9952610Z npm ERR! errno -2
2023-02-01T23:03:52.0035970Z npm ERR! enoent ENOENT: no such file or directory, open '/Users/runner/work/r1/a/deploy/.serverless/layers/nodejs/lib/package.json'
2023-02-01T23:03:52.0132520Z npm ERR! enoent This is related to npm not being able to find a file.
2023-02-01T23:03:52.0215200Z npm ERR! enoent 

Has anyone ever encountered something like this before?

Thanks!

harryd31 commented 1 year ago

@dmirandaapm It's show that it is AWS only