[PackFileCacheStrategy error because of 'fsevents' on windows
See original GitHub issueBug report
What is the current behavior?
[webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Can't resolve 'fsevents' in '<path>\node_modules\chokidar'
while resolving 'fsevents' in <path>\node_modules\chokidar to a directory
I tried installing fsevents as a dev dependency, but it says:
Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
It’s also skipped when chokidar is installed, I assume that fsevents is not available on windows.
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
caching works and no error
Other relevant information: webpack version: 5 Node.js version: v14.15.1 Operating System: Windows 7 Additional tools: Webpack is used in NextJS
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:6 (4 by maintainers)
Top Results From Across the Web
npm install fails in windows using fsevents #17671 - GitHub
I'm opening this issue because: npm is crashing. npm is producing an incorrect install. npm is doing something I don't understand.
Read more >error fsevents@1.0.14 in windows 7 - node.js - Stack Overflow
Actually, the problem here is the HTTP fetch. Try using npm install --no-optional. It will work.You can read more about this here.
Read more >Azure Pipelines - node.js build on Windows doesn't complete ...
It's a warning, not an error. It occurs because fsevents is an optional dependency, used only when project is run on macOS environment...
Read more >Cache - webpack
It's recommended to set cache.buildDependencies.config: [__filename] in your webpack configuration to get the latest configuration and all dependencies. webpack ...
Read more >Problems with npm install after loading project files. - Treehouse
this has been an ongoing occurrence with EVERY project in the REACT series. I am finally asking the question. What is going on?...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is a webpack bug. We need to make optional dependencies optional
I think you need to open an issue in nextjs repo