assertible / lambda-cloudwatch-slack

Send AWS CloudWatch notifications to a Slack channel using Lambda
https://assertible.com/blog/npm-package-lambda-cloudwatch-slack
MIT License
482 stars 249 forks source link

npm run deploy error #53

Closed lucasbittencourt02 closed 4 years ago

lucasbittencourt02 commented 4 years ago

Hi,

I´m trying running the deploy script, houwever i receiving the follow message.

`> lambda-cloudwatch-slack@0.3.0 deploy /home/ubuntu/lambda-cloudwatch-slack

./scripts/deploy.sh

=> Moving files to temporary directory Error: Cannot copy '.' to a subdirectory of itself, '/home/ubuntu/lambda-cloudwatch-slack/lambda-cloudwatch-slack-lambda'. at checkStats (/home/ubuntu/lambda-cloudwatch-slack/node_modules/fs-extra/lib/copy/copy.js:240:17) at fs.stat (/home/ubuntu/lambda-cloudwatch-slack/node_modules/fs-extra/lib/copy/copy.js:227:14) at callback (/home/ubuntu/lambda-cloudwatch-slack/node_modules/graceful-fs/polyfills.js:295:20) at FSReqWrap.oncomplete (fs.js:153:5)

npm ERR! Linux 4.15.0-1056-aws npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "deploy" npm ERR! node v8.10.0 npm ERR! npm v3.5.2 npm ERR! code ELIFECYCLE npm ERR! lambda-cloudwatch-slack@0.3.0 deploy: ./scripts/deploy.sh npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the lambda-cloudwatch-slack@0.3.0 deploy script './scripts/deploy.sh'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the lambda-cloudwatch-slack package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! ./scripts/deploy.sh npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs lambda-cloudwatch-slack npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls lambda-cloudwatch-slack npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /home/ubuntu/lambda-cloudwatch-slack/npm-deb npm-debug.log

ug.log `

ubuntu@api-h-beholder:~/lambda-cloudwatch-slack$ npm -v 3.5.2 ubuntu@api-h-beholder:~/lambda-cloudwatch-slack$ ubuntu@api-h-beholder:~/lambda-cloudwatch-slack$ node -v v8.10.0

CodyReichert commented 4 years ago

hey @lucasbittencourt02 i was able to track down this commit in our node-lambda dependency: https://github.com/motdotla/node-lambda/commit/cb9b93005fb1ec28cb0a3209ec7bdf780cc3577c

It's likely related. If you update version for that package in the package.json it should work:

  "devDependencies": {
    "node-lambda": "0.16.0"
  },

Can you try that and let me know if it works for you? (no big deal if not). I'll push a PR, but it would be good to confirm it fixes the issue.

Thanks!

dharmeshp31 commented 4 years ago

I had the same issue and it still says the same error after updating the package.json per your instructions @CodyReichert

rviniandrade commented 4 years ago

Hey @CodyReichert, this works for me. Thanks!

sasko-z commented 4 years ago

Hi, I have the same issue and the update of the package.json and package-lock.json didn't help. Any other suggestion how to solve this?

sasko-z commented 4 years ago

I have resolve it, I can confirm that changing version in package.json is working. Mine issue was in the .aws/credentials file, I don't use default profile for secret keys.

Hi, I have the same issue and the update of the package.json and package-lock.json didn't help. Any other suggestion how to solve this?