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

Bump dependencies so we can build w/o resolutions #241

Closed
wants to merge 1 commit into from
Closed

Bump dependencies so we can build w/o resolutions #241

wants to merge 1 commit into from

Conversation

OladapoAjala
Copy link

@jennydaman this PR fixes #238

Copy link
Member

@zrthxn zrthxn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not work. The task isn't just to remove that block. The problem is that this issue with preset-env causes build to fail. Now react-scripts uses a module (which I seem to have forgotten the name of) which uses another module which uses a version of preset-env that breaks our build.

@OladapoAjala
Copy link
Author

Hello @zrthxn I didn't just remove the block, I also edited the dependencies in the yarn.lock file.

So react-scripts depends on postcss-preset-env which also depends on postcss-custom-properties which finally depends on postcss-values-parser.

I bumped the postcss-custom-properties to v10.0.0 and the postcss-values-parser to v4 which solves the problem. I have successfully built the project on my local machine without the dependency resolution in the package.json file.

@zrthxn
Copy link
Member

zrthxn commented Oct 11, 2021

You're not supposed to edit the yarn.lock file to do this. This is because your changes will get overwritten whenever a new package is installed. The lock file is meant to be just for the package manager to handle module resolution. It even says this on the top of the file.

You should instead change the versions of the react-scripts package to test and see what works.

@OladapoAjala
Copy link
Author

That was my first approach, I upgraded react-scripts to v4. However, there are other libraries that also depend on postcss-values-parser v2.0.1 hence it didn't get updated.

Except I upgrade all the other libraries which have a common sub-dependency with react-scripts then I wouldn't have to edit the yarn.lock file.

@zrthxn
Copy link
Member

zrthxn commented Oct 11, 2021

Okay then maybe try that. Upgrade all the other libraries which have the common sub-dependency to postcss-values-parser and see if that works. If it doesn't, it's not that terrible to have resolutions, at least until the issue is fixed at the source.

@OladapoAjala
Copy link
Author

Thanks @zrthxn for pointing that I shouldn't edit the yarn.lock file, I had thought that since it was a sub-dependency it wouldn't get affected whenever a new package is installed (I was wrong!).

I would upgrade all the other dependencies and see what happens. Thanks

@jennydaman jennydaman closed this Jan 14, 2022
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.

Bump dependencies so we can build w/o resolutions
3 participants