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

Webpack 5 build errors with persistent/disk cache #32

Open
Akryum opened this issue Oct 12, 2021 · 6 comments
Open

Webpack 5 build errors with persistent/disk cache #32

Akryum opened this issue Oct 12, 2021 · 6 comments
Labels
help wanted Extra attention is needed upstream webpack

Comments

@Akryum
Copy link

Akryum commented Oct 12, 2021

Reproduction link: https://github.com/Akryum/unplugin-icons-issue-94

  1. Build a webpack 5 project with persistent caching -> Success
  2. Build again -> Success
  3. Build again -> Error

The build crashes with errors - examples:

 error  in ./virtual:~icons/feather/smile

Syntax Error: no such file or directory, open '/home/akryum/Projects/livestorm-app/packages/frontend/virtual:~icons/feather/smile'


 error  in ./virtual:~icons/feather/x-circle

Syntax Error: no such file or directory, open '/home/akryum/Projects/livestorm-app/packages/frontend/virtual:~icons/feather/x-circle'


 error  in ./virtual:~icons/feather/x

Syntax Error: no such file or directory, open '/home/akryum/Projects/livestorm-app/packages/frontend/virtual:~icons/feather/x'

Related to unplugin/unplugin-icons#94

@Akryum
Copy link
Author

Akryum commented Oct 12, 2021

Commenting the load part of the unplugin plugin (here) makes the error go away. So the issue is probably related to load.

@Akryum
Copy link
Author

Akryum commented Oct 12, 2021

So when the error happens, resolveId is not called and then plugin.__vfsModules doesn't have the virtual module so it fails.

@Akryum
Copy link
Author

Akryum commented Oct 12, 2021

Maybe related to sysgears/webpack-virtual-modules#76

@antfu antfu added help wanted Extra attention is needed upstream labels Oct 25, 2021
@Akryum
Copy link
Author

Akryum commented Nov 30, 2021

Looks like there is an open PR: sysgears/webpack-virtual-modules#128

@yunsii
Copy link

yunsii commented Aug 9, 2023

sysgears/webpack-virtual-modules#164 It looks like fixed with [email protected] but I still got the error with vercel build:
image

@adarshmadrecha
Copy link

Since the upstream issue is resolved, we can close this issue?

@sxzz sxzz added the webpack label Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed upstream webpack
Projects
None yet
Development

No branches or pull requests

5 participants