-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
FileSystemInfo can not createSnapshot with symbol link #12246
Comments
Yep bug |
@alexander-akait Thanks for confirm, I can have a try to fix it. |
Use fs.lstat instead of fs.stat to get file meta. If file is symbol link use fs.realpath to get real path, and use real path to do recursive call. Refs: - webpack#12246
Use fs.lstat instead of fs.stat to get file meta. If file is symbol link use fs.realpath to get real path, and use real path to do recursive call. Refs: - webpack#12246
Use fs.lstat instead of fs.stat to get file meta. If file is symbol link use fs.realpath to get real path, and use real path to do recursive call. Refs: - webpack#12246
Other example of the problem with symlinks #12503 (comment) |
Use fs.lstat instead of fs.stat to get file meta. If file is symbol link use fs.realpath to get real path, and use real path to do recursive call. Refs: - webpack#12246
Another example #12810 |
This issue had no activity for at least three months. It's subject to automatic issue closing if there is no activity in the next 15 days. |
bump |
Do we have an ETA on when this might be fixed? |
Use fs.lstat instead of fs.stat to get file meta. If file is symbol link use fs.realpath to get real path, and use real path to do recursive call. Refs: - webpack#12246
Hi @sokra, I found that some specific libs will still cause the snapshot to fail in git clone git@github.com:killagu/npminstall_webpack.git
cd npminstall_webpack
npm i -g cnpm
# must use cnpm install
cnpm i
# NEW: install the video.js library
cnpm install video.js -S
npm run build
<--- JS stacktrace --->
FATAL ERROR: invalid array length Allocation failed - JavaScript heap out of memory |
@qiqiboy update wepback to the latest stable version |
Yes, I have tried, but still fail. cnpm install video.js webpack@latest -S
npm run build |
Can't reproduce the problem |
@alexander-akait my env info: $ cnpm -v
cnpm@7.0.0 (/usr/local/lib/node_modules/cnpm/lib/parse_argv.js)
npm@6.14.15 (/usr/local/lib/node_modules/cnpm/node_modules/npm/lib/npm.js)
node@14.17.5 (/usr/local/bin/node)
npminstall@5.0.2 (/usr/local/lib/node_modules/cnpm/node_modules/npminstall/lib/index.js)
prefix=/usr/local
darwin x64 20.3.0
registry=https://registry.nlark.com |
Increase your memory usage, file is so bug, not related to this problem |
Bug 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
Because of a,b is reference by each other,
contextTimestampQueue
andcontextHashQueue
inFileSystemInfo
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
Build snapshow will fail.
What is the expected behavior?
fs.lstat
to get file info, and use target path to process.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.
The text was updated successfully, but these errors were encountered: