Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Artifact name mis-interpolated #41

Open
daemianmack opened this issue Mar 30, 2019 · 1 comment
Open

Artifact name mis-interpolated #41

daemianmack opened this issue Mar 30, 2019 · 1 comment

Comments

@daemianmack
Copy link

Hey there! I'm following the instructions in the README without any tweaks, using the lein template as described and am getting an odd error trying to upload the artifact.

src> lein new serverless-cljs serverless-cljs-example
src> cd serverless-cljs-example
serverless-cljs-example> lein deps
serverless-cljs-example> SLS_DEBUG=* AWS_PROFILE=<MY-PROFILE> serverless deploy
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command create
[...]
Serverless: [AWS s3 200 0.243s 0 retries] putObject({ Body:
   <Buffer 7b 22 41 57 53 54 65 6d 70 6c 61 74 65 46 6f 72 6d 61 74 56 65 72 73 69 6f 6e 22 3a 22 32 30 31 30 2d 30 39 2d 30 39 22 2c 22 44 65 73 63 72 69 70 74 ... 3944 more bytes>,
  Bucket:
   'serverless-cljs-example-serverlessdeploymentbuck-lqiyoq34buwi',
  Key:
   'serverless/serverless-cljs-example/dev/1553968044501-2019-03-30T17:47:24.501Z/compiled-cloudformation-template.json',
  ContentType: 'application/json',
  Metadata:
   { filesha256: 'k9Rs/1BMSyWQNTvj6FEXACL+PSeNaW0vi3Hi7FHR6yk=' } })
Serverless: Uploading artifacts...

  Error --------------------------------------------------

  ENOENT: no such file or directory, stat '/Users/daemian/src/serverless-cljs-example/.serverless/Users/daemian/src/serverless-cljs-example/.serverless/serverless-cljs-example.zip'

     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

  Stack Trace --------------------------------------------

Error: ENOENT: no such file or directory, stat '/Users/daemian/src/serverless-cljs-example/.serverless/Users/daemian/src/serverless-cljs-example/.serverless/serverless-cljs-example.zip'
    at Object.statSync (fs.js:871:3)
    at BbPromise.map (/usr/local/Cellar/serverless/1.39.0/libexec/lib/node_modules/serverless/lib/plugins/aws/deploy/lib/uploadArtifacts.js:118:24)

You can see in the above that the artifact path is duplicated...

/Users/daemian/src/serverless-cljs-example/.serverless/Users/daemian/src/serverless-cljs-example/.serverless/serverless-cljs-example.zip

but that file is actually at:

/Users/daemian/src/serverless-cljs-example/.serverless/serverless-cljs-example.zip

Finding Issue #34 I tried the --lumo deploy flag but encountered the same issue.

I also tried updating the generated project.clj to reference :npm {:dependencies [[serverless-cljs-plugin "0.2.2"]]} instead of the generated "0.1.2", but no dice.

OS version: Mac OSX 10.13.6
NPM version: 6.7.0
serverless version: 1.39.0

@daemianmack
Copy link
Author

I did an in-place hack to instrument the ./node_modules/serverless-cljs-plugin/index.js file with some debug log statements and when I re-ran the serverless deploy the above error didn't occur, and after much IAM fiddling I was able to successfully deploy.

Not sure if that instrumentation caused some cache to expire, but I suppose we can close this?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant