You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our Yarn2 e2e test did not use the latest version of Docusaurus.
After I fixed it, Yarn2 failed due to this missing file-loader.
As a temporary solution, added the file-loader to the init template sites so it can build on Yarn2.
This should be fixed once we migrate to the new assets system: #4708
Any update on this? The PR has been inactive for 2 months now. The temporary solution doesn't work although I have file-loader and url-loader as dependencies.
Module not found: Error: Can't resolve 'url' in '.yarn\$$virtual\@docusaurus-core-virtual-ee257a6165\0\cache\@docusaurus-core-npm-2.0.0-beta.3-e31061f4c9-86b35725e9.zip\node_modules\@docusaurus\core\lib\webpack\react-dev-utils-webpack5'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "url": require.resolve("url/") }'
- install 'url'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "url": false }
You can add the missing polyfills yourself if you need to: create a local docusaurus plugin that modify the existing Webpack configuration to add that polyfill
Activity
slorber commentedon May 12, 2021
It's something I noticed during the Webpack 5 PR.
Our Yarn2 e2e test did not use the latest version of Docusaurus.
After I fixed it, Yarn2 failed due to this missing file-loader.
As a temporary solution, added the file-loader to the init template sites so it can build on Yarn2.
This should be fixed once we migrate to the new assets system: #4708
HazyFish commentedon Jul 16, 2021
Any update on this? The PR has been inactive for 2 months now. The temporary solution doesn't work although I have
file-loaderandurl-loaderas dependencies.slorber commentedon Jul 16, 2021
@HazyFish this PR is stuck until I figure out a proper way to solve this problem: webpack/webpack#12900 (comment)
(any help welcome)
Your issue does not look related to Yarn2/file-loader/url-loader but more about Webpack not polyfilling nodejs modules anymore.
https://blog.sindresorhus.com/webpack-5-headache-b6ac24973bf1
You can add the missing polyfills yourself if you need to: create a local docusaurus plugin that modify the existing Webpack configuration to add that polyfill
hhaoao commentedon Nov 14, 2021
oh, Is there any progress on this issue?
I installed these two missing packages and it works fine.
testing-library/testing-library-docs#928