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

AWS - Incorrect path seperate used when defining package path. #5934

Closed
maxplezzel opened this issue Mar 17, 2019 · 17 comments
Closed

AWS - Incorrect path seperate used when defining package path. #5934

maxplezzel opened this issue Mar 17, 2019 · 17 comments

Comments

@maxplezzel
Copy link

maxplezzel commented Mar 17, 2019

This is a Bug Report

Description

Incorrect path separator used when determining where the deployment artefact is located in AWS deployment.

  • What went wrong?
    When setting the package path the wrong path seperate was being used for MacOS, resulting in the incorrect path being used to upload artefacts to S3.

  • What did you expect should have happened?
    Correct path seperate to be used based upon OS.

  • What was the config you used?
    Standard

  • What stacktrace or error message from your provider did you see?

Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...

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

  ENOENT: no such file or directory, stat './server/.serverless/.serverless/fishcare-cms-server.zip'

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

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com

  Your Environment Information -----------------------------
     OS:                     darwin
     Node Version:           9.3.0
     Serverless Version:     1.39.0

Solution

Change:

  • File: serverless/lib/plugins/aws/package/lib/saveServiceState.js
  • Line: 35
  • To: packageRef.artifact.substr(packageRef.artifact.lastIndexOf(path.sep) + 1)

I would make the change myself but haven't contributed before and don't have time right now to meet contribution requirements.

@julienseverin
Copy link

Got the same issue, had to rollback to 1.38.0

@ClementKerneur
Copy link

Same problem, i rollback to 1.38.0 also !!!

@chrisanderss0n
Copy link

I will fix, PR coming up.

@ghost
Copy link

ghost commented Mar 18, 2019

I've been sitting with this issue for two days now, thanks @maxplezzel
Finally got it working🐱‍👤

@pmuens
Copy link
Contributor

pmuens commented Mar 18, 2019

Just reverted #4188 which seems to be the root cause. Patch release should be out in ~30 minutes...

@decebal
Copy link

decebal commented Aug 16, 2019

Somehow this one has resurfaced in the latest versions 1.49 and 1.50, I am still on my way to test which one works.
I rolled back to 1.38.0, but a more thorough investigation would be better, I think.

@aardrop
Copy link

aardrop commented Apr 17, 2020

I'm still having this issue with version 1.66. I'm happy to roll back for now but I worry that is not sustainable, does anyone know a solution or work around?

@colorninja
Copy link

Seems to have found it's way back into 1.66 apparently and 1.68 doesn't work for me too. I am running into the following error (PC configuration included):

Serverless: Packaging service...
 Serverless: Excluding development dependencies...
  
   Error --------------------------------------------------
  
   Error: ENOENT: no such file or directory, open '/builds/.../node_modules/.bin/image-size'
  
      For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
  
   Get Support --------------------------------------------
      Docs:          docs.serverless.com
      Bugs:          github.com/serverless/serverless/issues
      Issues:        forum.serverless.com
  
   Your Environment Information ---------------------------
      Operating System:          linux
      Node Version:              12.14.1
      Framework Version:         1.68.0
      Plugin Version:            3.6.8
      SDK Version:               2.3.0
      Components Version:        2.30.2

@alphonso77
Copy link

I was experiencing this behavior as well. I tried reverting to several versions to no avail. I dug around a little bit and I'm not sure which one of these actions fixed the problem, but here's the steps I took (windows 10, PS):

  1. Run npm list -g --depth 0 (this listed all of the packages I'd installed globally via npm, and several of them had broken dependencies)
  2. uninstall all npm packages (including serverless): npm uninstall -g <package-name>
  3. choco upgrade serverless
  4. run sls deploy again, works

@cknuteson-firstlook
Copy link

cknuteson-firstlook commented May 5, 2020

Chiming in to say this is happening with 1.69.0

Serverless: Compiling with Typescript...
Serverless: Using local tsconfig.json
Serverless: Typescript compiled.
Serverless: Packaging service...
Serverless: Excluding development dependencies...
 
  Error --------------------------------------------------
 
  Error: ENOENT: no such file or directory, stat '/Users/<me>/<project>/packages/backend/.build/node_modules/.bin/tsc'
 
     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
 
  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com
 
  Your Environment Information ---------------------------
     Operating System:          darwin
     Node Version:              12.16.1
     Framework Version:         1.69.0 (standalone)
     Plugin Version:            3.6.8
     SDK Version:               2.3.0
     Components Version:        2.30.2

@mithundas79
Copy link

This is an issue when i am trying to use the serverless express template.

C:\Users\LENOVO\Documents\Official\Projects\OCPP-Client\bluedot-cpms-service\ocpp_express>serverless create --template-url https://github.com/serverless/components/tree/master/templates/express
Serverless: Generating boilerplate...
Serverless: Downloading and installing "templates\express"...
(node:22640) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated

  Serverless Error ---------------------------------------

  Error: ENOENT: no such file or directory, stat 'C:\Users\LENOVO\AppData\Local\Temp\components\templates\express'

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com

  Your Environment Information ---------------------------
     Operating System:          win32
     Node Version:              13.9.0
     Framework Version:         1.78.1
     Plugin Version:            3.7.0
     SDK Version:               2.3.1
     Components Version:        2.34.5

@mithundas79
Copy link

@bcraft
Copy link

bcraft commented Dec 4, 2020

picked this exact issue up again today on 2.12, replicated things manually and cannot repeat the error but sls package wont go through.

@wmlutz
Copy link

wmlutz commented Dec 12, 2020

@bcraft I just tried to get things going today on 2.15.0 and ran into the same problem.

@mithundas79
Copy link

Ok problem is https://github.com/serverless/components/tree/master/templates/express NOT FOUND :(

I hv not taken the template, rather i used the simplier serverless-http method and this is running for me. So not sure my issue is related to anything above.

@brognilucas
Copy link

Having the same problem here. When I deploy from my local environment works though.

@crsepulv
Copy link

in my case the problem is

  • serverless-plugin-typescript
    if I remove it, deploys well.

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

No branches or pull requests