question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FileSystemInfo can not createSnapshot with symbol link

See original GitHub issue

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

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:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
killagucommented, Dec 21, 2020

@alexander-akait Thanks for confirm, I can have a try to fix it.

0reactions
alexander-akaitcommented, Sep 9, 2021

Increase your memory usage, file is so bug, not related to this problem

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found