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

netlify.toml file with frozen lockfile flag #179

Closed
wants to merge 1 commit into from

Conversation

MicheleCynowicz
Copy link
Collaborator

@MicheleCynowicz MicheleCynowicz commented Sep 5, 2020

Issue
In the current package.json file, we have the Vuepress package as the main dependency set to "vuepress": "^1.5.3". This means that since Vuepress has had a minor version bump to 1.5.4, that fresh yarn installations and fresh yarn builds that recreated the yarn.lock file will pull 1.5.4. There is a small problem in the 1.5.4 vuepress release which relies on a specific use case of the @extends method in stylus but the version of stylus that is a deep dependency of vuepress is not a high-enough version, so that one case of the @extends method that was added in 1.5.4: vuejs/vuepress@ceb0fa9#r41730374

we see a build failure locally and in Netlify like this:
Screen Shot 2020-09-05 at 11 03 53 AM

There are several possible workarounds for this build error:

  1. We change the vuepress package version in the package.json file to pin to `"vuepress": "1.5.3" until the next minor tag release with the fix in it. ( Forthcoming, I assume, since this PR has already been merged: build($theme-default): bump stylus version vuejs/vuepress#2587 )

  2. We leave the package.json as-is, but implement a netlify.toml file that sets the yarn install command to have a --frozen-lockfile flag so that Netlify doesn't build fresh a fresh lockfile each time and only installs package versions we have purposely committed to the lockfile in development and testing. ( This could be standard even if it's not the method we use to fix this build issue )

  3. We add a resolution in the package.json file to resolve stylus to the latest version that supports the vuepress 1.5.4 use of the @extends method: "vuepress/**/stylus": "^0.54.8". ( Temporary fix that will work in the interim while waiting for the next release tag of vuepress based on the merged PR mentioned in option 1. We would want to remove the resolution once that vuepress tag is released. )

Changes Proposed

Describe the work you did in this Pull Request.

  1. ...
  2. ...
  3. ...

Testing Instructions

If this work needs manual testing, please provide clear steps for us to test.

  1. ...
  2. ...
  3. ...

Extra Information

Is there anything else we need to know? Tell us here.

Share with Us!

(Optional) Tell us something you learned while working on this issue, and/or a fun GIF!

@jlooper
Copy link
Contributor

jlooper commented Oct 12, 2020

Upgrading VuePress seems to have stopped errors and failing builds, so closing

@jlooper jlooper closed this Oct 12, 2020
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

Successfully merging this pull request may close these issues.

2 participants