netlify.toml file with frozen lockfile flag #179
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
In the current
package.jsonfile, 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 theyarn.lockfile 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@extendsmethod instylusbut the version ofstylusthat is a deep dependency ofvuepressis not a high-enough version, so that one case of the@extendsmethod that was added in 1.5.4: vuejs/vuepress@ceb0fa9#r41730374we see a build failure locally and in Netlify like this:

There are several possible workarounds for this build error:
We change the vuepress package version in the
package.jsonfile 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 )We leave the
package.jsonas-is, but implement anetlify.tomlfile that sets theyarn installcommand to have a--frozen-lockfileflag 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 )We add a resolution in the
package.jsonfile to resolvestylusto the latest version that supports the vuepress 1.5.4 use of the@extendsmethod:"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.
Testing Instructions
If this work needs manual testing, please provide clear steps for us to test.
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!