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

chore(gatsby): upgrade webpack #14792

Closed
wants to merge 2 commits into from

Conversation

wardpeet
Copy link
Contributor

@wardpeet wardpeet commented Jun 14, 2019

Description

Upgrades webpack to the latest again so we can remove the mjs hack. It got fixed by webpack upgrading to acorn@^6.

I've linked an issue below that seems to have issues with webpack 4.29.0 on npm. I've tried reproduce it with their repo's and npm versions but sadly no way for me to reproduce.

To let people test I created a gatsby version on npm. npm install gatsby@webpack-acorn

Related Issues

#11198
fixes #15775

@wardpeet wardpeet requested a review from a team as a code owner June 14, 2019 14:35
@freiksenet
Copy link
Contributor

Did you try it with developrunner?

@DSchau DSchau added the status: blocked This issue/PR can't be solved at the moment and shouldn't be closed/merged label Jun 17, 2019
@DSchau
Copy link
Contributor

DSchau commented Jun 17, 2019

Marking as blocked until we fix this comment

Also @wardpeet you'll want to remove the .mjs tests for webpack.config :)

@wardpeet
Copy link
Contributor Author

This is currently blocked by @pieh/friendly-errors-webpack-plugin on npm.

There was a problem loading the local build command. Gatsby may not be installed. Perhaps you need to run "npm install"? Cannot find module 'webpack/lib/RequestShortener'



  Error: Cannot find module 'webpack/lib/RequestShortener'

This is fixed in friendly-errors-webpack-plugin@v2.0.0-beta.2 still in beta.

@pieh
Copy link
Contributor

pieh commented Jul 16, 2019

This is currently blocked by @pieh/friendly-errors-webpack-plugin on npm.

I have to check but maybe we don't need to use my fork anymore

@wardpeet
Copy link
Contributor Author

wardpeet commented Jul 17, 2019

@pieh we do, unless we are ok with going for a beta package? Your pr got merged but is only published in the beta package

@pieh
Copy link
Contributor

pieh commented Jul 17, 2019

@pieh we do, unless we are ok with going for a beta package? Your pr got merged but is only published in the beta package

Is the actual error:

  Error: Cannot find module 'webpack/lib/RequestShortener'

fixed there as well?

--edit:
https://github.com/geowarin/friendly-errors-webpack-plugin/blob/master/src/core/extractWebpackError.js
It's still there, so maybe is something we can fix for now in my fork and create another PR against friendly-errors-webpack-plugin (tho not sure how much value is there in this - because we will need to drop that plugin altogether for structured logging)

@sidharthachatterjee
Copy link
Contributor

Looks like Renovate upgraded us to ~4.39.2 (latest) so closing this.

We can open another PR to revert that upgrade if the issue that this was blocked by is still around.

@wardpeet wardpeet deleted the chore/upgrade-webpack branch September 2, 2019 13:02
cometkim added a commit to cometkim/gatsby-plugin-treat that referenced this pull request Nov 20, 2019
Webpack finishModules should be AsyncSeriesHook for this plugin.

See webpack/webpack@ea172ec
See gatsbyjs/gatsby#14792

It has been fixed by gatsbyjs/gatsby@b692879
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: blocked This issue/PR can't be solved at the moment and shouldn't be closed/merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

upgrade webpack version
5 participants