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

npm install pulling v4 breaking CI #12503

Closed
4 tasks done
LorenzoRogai opened this issue May 21, 2024 · 11 comments
Closed
4 tasks done

npm install pulling v4 breaking CI #12503

LorenzoRogai opened this issue May 21, 2024 · 11 comments

Comments

@LorenzoRogai
Copy link

Are you certain it's a bug?

  • Yes, it looks like a bug

Is the issue caused by a plugin?

  • It is not a plugin issue

Are you using the latest v3 release?

  • Yes, I'm using the latest v3 release

Is there an existing issue for this?

  • I have searched existing issues, it hasn't been reported yet

Issue description

The "npm install serverless" command now pulls the v4 breaking all the CIs

was this announced? I read that the v4 is still in beta

This workflow now fails and it was working fine before

name: Test
on:
  workflow_dispatch:

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - name: Install Serverless
        run: sudo npm install -g serverless
      - name: Test
        run: |
          serverless --version

Service configuration (serverless.yml) content

N/A

Command name and used flags

N/A

Command output

N/A

Environment information

N/A
@kchecoBasis
Copy link

This issue is coming up for us also. Github CI builds work well using 3.38.0 but recently v4 is being installed. We utilize serverless-bundle for webpack builds. Debugged by installing v4 on my local machine.

We have fixed our github actions in the short-term to run

npm install -g serverless@3.38.0
Screenshot 2024-05-21 at 6 58 25 PM

@Mmarzex
Copy link
Contributor

Mmarzex commented May 22, 2024

@LorenzoRogai sorry this impacted you, but the reason you are seeing issues is due to your install of v4 not being authenticated. You can go to our upgrade guide and read about setting an access key or a license key in your CICD pipeline.

@richard-stafflink

This comment was marked as abuse.

@austencollins
Copy link
Member

@LorenzoRogai Always pin to specific versions for all dependencies. You can pin to V3 by adding the version to your global install command:

npm install -g serverless@3.38.0

@kchecoBasis

We utilize serverless-bundle for webpack builds.

Also fyi, esbuild is in V4 by default, allowing for native bundling and Typescript support.

@richard-stafflink

A custom plugin reference in the serverless.yml file was path to a .js file

Can you share more about your set-up here and the directory structure?

Gets past this error, but then another error, plugin doesn't seem to be compatible with V4:
serverless/plugins#429

Looking into this one...

@austencollins
Copy link
Member

Closing this since the original issue is resolved. Opening new issues to investigate the other problems raised here.

@richard-stafflink

This comment was marked as abuse.

@j-fulbright

This comment was marked as abuse.

@kchecoBasis
Copy link

npm install -g serverless@3.38.0

Now in our CI builds, even though we specify to use 3.38.0, version 4 is being installed.

@austencollins
Copy link
Member

@kchecoBasis This is likely not possible. Something else is happening here that is causing V4 to be installed. Try npm ls -g to help identify the global installed libraries and their versions.

@kchecoBasis
Copy link

kchecoBasis commented May 23, 2024

@ac360 Will add npm ls -g once we clear sls config issues. We are currently setting our configs to use v4 without using the default esbuild functionality. In the near future, we will update them to use the default esbuild feature in our playground environment and observe time to deployment, bundling size, etc.

Regarding v4 being installed, we have defined serverless@3.38.0 in our github actions workflow but somehow it is now being ignored.

UPDATE: Seems like our team initiated a package build while changes to github actions had not been merged to our staging branch. Will confirm in a few minutes.

UPDATE: The package workflow is not utilizing the updated command, we will debug on our end.

@kchecoBasis This is likely not possible. Something else is happening here that is causing V4 to be installed. Try npm ls -g to help identify the global installed libraries and their versions.

Screenshot 2024-05-23 at 3 59 09 PM

Screenshot 2024-05-23 at 3 59 43 PM

Screenshot 2024-05-23 at 4 14 06 PM

Screenshot 2024-05-23 at 4 07 47 PM

@Mmarzex
Copy link
Contributor

Mmarzex commented May 23, 2024

@kchecoBasis going off of those pictures it looks like the second one installs v3.38.0 correctly but the Package with Serverless Framework still is installing latest, which will be v4

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

6 participants