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

Error: Cannot find module 'postcss-flexbugs-fixes' after upgrading to 9.3.4 #11783

Closed
pjaws opened this issue Apr 9, 2020 · 8 comments · Fixed by #11966
Closed

Error: Cannot find module 'postcss-flexbugs-fixes' after upgrading to 9.3.4 #11783

pjaws opened this issue Apr 9, 2020 · 8 comments · Fixed by #11966
Labels
good first issue Easy to fix issues, good for newcomers

Comments

@pjaws
Copy link
Contributor

pjaws commented Apr 9, 2020

Bug report

Describe the bug

next build fails with the error in the title after updating to 9.3.4 with a custom PostCSS config following the current documentation

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Create a postcss.config.js with the contents specified here
  2. Update to 9.3.4
  3. No more builds!

Expected behavior

Documentation needs to be updated with the correct "base" PostCSS config for 9.3.4. I know you apparently removed postcss-flexbugs-fixes, but I have no idea what else might have changed.

@Timer
Copy link
Member

Timer commented Apr 9, 2020

You need to install these dependencies yourself, otherwise you're relying on an implicit dependency from Next.js. We might need to update the docs to make this more clear.

@timneutkens
Copy link
Member

timneutkens commented Apr 10, 2020

These aren't MY dependencies, they're yours. I wouldn't have them in this file if you didn't tell me to.

The moment you reference a dependency in your application configuration like postcss.config.js it's a dependency of your project.

Definitely can be mentioned in the docs that you have to install it, but you can't reference internal npm dependencies of other dependencies (like next.js) in a safe way as dependencies can change at any time.

An example would be (generic node.js example), you add fs-extra to your project and then import rimraf without adding it to your dependencies.

If you want to rely on Next.js configuring postcss you don't add postcss.config.js, otherwise it's up to you as a user to configure it and add the correct dependencies.

postcss-flexbug-fixes was not removed from Next.js for example.

@pjaws
Copy link
Contributor Author

pjaws commented Apr 10, 2020

That's fair, but the documentation should also be updated when you change something like this. If a user right now goes and follows the advice in your docs, their application will break!

Again, the ideal solution would be to offer a way of extending or importing your base config.

@pjaws pjaws closed this as completed Apr 12, 2020
@timneutkens
Copy link
Member

Let's keep this open to improve the docs, mention installing the deps basically.

@timneutkens timneutkens reopened this Apr 13, 2020
@timneutkens timneutkens added Documentation good first issue Easy to fix issues, good for newcomers labels Apr 13, 2020
@pjaws
Copy link
Contributor Author

pjaws commented Apr 15, 2020

I'd gladly update the docs if I knew what config you were using now.

@timneutkens
Copy link
Member

It's the same config, only thing that has to be mentioned is that the user has to install the mentioned dependencies like postcss-flexbugs-fixes through npm install postcss-flexbugs-fixes etc

@timneutkens
Copy link
Member

timneutkens commented Apr 17, 2020

Fixed by #11966. Thank you @pjaws 💯

@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Easy to fix issues, good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants