FileSystemInfo can not createSnapshot with symbol link
See original GitHub issueBug report
What is the current behavior?
I install deps with npminstall(it can install faster), but the file tree in node_modules
is special bacause npminstall install pkgs with symbol link to download and write less files.
The file tree looks like this
app
├── index.js
└── node_modules
├── _a@1.0@a(real dir)
| ├── index.js
| └── node_modules
| └── b(symbol link to app/node_modules/_b@1.0@b)
├── _b@1.0@b(real dir)
| ├── index.js
| └── node_modules
| └── a(symbol link to app/node_modules/_a@1.0@a)
├── a(symbol link to app/node_modules/_a@1.0@a)
└── b(symbol link to app/node_modules/_b@1.0@b)
Because of a,b is reference by each other, contextTimestampQueue
and contextHashQueue
in FileSystemInfo
will never reach the end.
If the current behavior is a bug, please provide the steps to reproduce.
The minimal reproduction repo is here. The reproduce step is
git clone git@github.com:killagu/npminstall_webpack.git
cd npminstall_webpack
npm i -g cnpm
# must use cnpm install
cnpm i
npm run build
Build snapshow will fail.
What is the expected behavior?
- Use
fs.lstat
to get file info, and use target path to process. - Skip files if has been processed
Other relevant information:
webpack version: 5.11.0 Node.js version: 12.16.3 Operating System: macOS Big Sur 11.0.1 (20B29)
If it is ok, I’m happy to make a pr to fix it.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:14 (9 by maintainers)
Top Results From Across the Web
node.js - Cannot read property 'createSnapshot' of undefined
I check it out, it's an error in file watcher api, that mainCompilation.fileSystemInfo is undefined, so it cannot read prop createSnapShot ...
Read more >Missing symlink in the images built using Kaniko #1944 - GitHub
The image built from a Dockerfile using kaniko should the same as the ones built using Docker, it must include all files including...
Read more >Symbolic links in snapshot views - IBM
Snapshot views created from a Rational ClearCase host running Windows software do not support links. VOB symbolic link behavior is approximated in the ......
Read more >Directory.CreateSymbolicLink(String, String) Method (System.IO)
A DirectoryInfo instance that wraps the newly created directory symbolic link. Exceptions. ArgumentNullException. path or pathToTarget is null .
Read more >cp -al not creating hard links - Unix & Linux Stack Exchange
While cp -al does create hardlinks when using it on my main system (Mint 18.1), where the parent directory size stays mostly the...
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 Free
Top 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
@alexander-akait Thanks for confirm, I can have a try to fix it.
Increase your memory usage, file is so bug, not related to this problem