Skip to content

How to update npm used for Oryx? #694

@SvenAeltermanInfo

Description

@SvenAeltermanInfo

On every single build, we receive the following warning:

npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!

While the build succeeds, I would rather be able to update the npm version that Oryx uses to the latest.

To Reproduce
Steps to reproduce the behavior:

  1. Create a Node.js project that uses an npm version >= 7
  2. Attempt to deploy to a SWA

Expected behavior
I think I understand why keeping an older npm version on Oryx makes sense (for those projects with older npm versions and lockfile versions), but I would like to be able to upgrade the version used for my builds.

Additional context
I have tried adding a step to the job containing npm install -g npm@latest. That command executes successfully, but it doesn't affect the npm version used in Oryx, which is 6.14.15.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions