The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
If fs.cpSync copied your framework but the destination’s symlinks still point into a cache, check the options passed to the copy: Node.js defaults dereference to false, so links are preserved rather than followed. Set dereference: true to request copies of the symlink targets. Because the Node.js version and exact call are not specified here, confirm both before treating that default as the cause.
Why the copied framework still points at the cache
fs.cpSync(src, dest[, options]) copies a directory structure and files. Its dereference option controls whether it follows symlinks; the Node.js API documents the option as “dereference symlinks. Default: false.” With the default, the destination can contain a symlink rather than a copy of the item the link targets. If that link is relative or absolute in a way that resolves into the original cache, it can continue to point there after the copy.
This explanation fits a call that omits dereference or sets it to false. The symptom alone does not establish what options were used, what the source and destination paths are, or how each link resolves. Check those details before diagnosing a particular copy.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallNode.js File system API documentation, v26.10.0
How to make fs.cpSync copy symlink targets
Set dereference: true in the options object. If the source is a directory tree, include recursive: true so the copy traverses it:
#1 Best Overall
- Get NVMe solid state performance with up to 1050MB/s read and 1000MB/s write speeds in a portable, high-capacity drive(1) (Based on internal testing; performance may be lower depending on host device & other factors. 1MB=1,000,000 bytes.)
- Up to 3-meter drop protection and IP65 water and dust resistance mean this tough drive can take a beating(3) (Previously rated for 2-meter drop protection and IP55 rating. Now qualified for the higher, stated specs.)
- Use the handy carabiner loop to secure it to your belt loop or backpack for extra peace of mind.
- Help keep private content private with the included password protection featuring 256‐bit AES hardware encryption.(3)
- Easily manage files and automatically free up space with the SanDisk Memory Zone app.(5). Non-Operating Temperature -20°C to 85°C
const fs = require('node:fs');
fs.cpSync(source, destination, {
recursive: true,
dereference: true,
});
Use the equivalent import syntax if your project uses ES modules. The important setting for following symlinks is dereference; recursive controls recursive directory copying.
Do not confuse dereference with verbatimSymlinks
verbatimSymlinks is a different option. It controls whether path resolution for symlinks is skipped, and its documented default is false. It does not mean “copy the targets instead of the links”; use dereference: true for that request.
Rank #2
- Solid state performance with up to 800MB/s read speeds in a portable drive. (Based on internal testing; performance may be lower depending on host device, interface, usage conditions and other factors. 1MB=1,000,000 bytes.)
- Back up your content and memories on a storage solution that fits seamlessly into your mobile lifestyle.
- Take it with you on your adventures—up to two-meter drop protection means this durable drive can take a beating. (Based on internal testing.)
- Secure it to your belt loop or backpack for extra peace of mind thanks to the tough rubber hook.
- From Sandisk, a brand professional photographers trust to take on assignments.
Check the call and the links when the result is unexpected
- Confirm the runtime: run
node --versionin the same environment that performs the copy. The API documentsfs.cpSyncas added in Node.js v16.7.0 and no longer experimental starting in v22.3.0. - Inspect the literal options: verify that the executing call—not just a wrapper’s intended configuration—passes
dereference: true. For directory trees, check whetherrecursive: trueis present. - Check both paths: record the source and destination layout and inspect whether each relevant symlink is relative or absolute. Determine where its target resolves from the copied location; a relative link can resolve differently when its surrounding directory changes.
- Reproduce with a small copy: test the same runtime and options on a minimal directory containing a symlink. This helps distinguish a configuration or path-layout issue from behavior specific to the larger framework.
If dereference: true still leaves a symlink
A report in Node.js issue #59168 describes a caller on v22.17 who saw a destination symlink despite using { dereference: true, recursive: true }. That is a version-specific reported reproduction, not proof that every v22.17 copy behaves this way or that it explains another user’s result. The available information does not establish the issue’s resolution or an affected-version range.
If your minimal reproduction behaves the same way, capture the exact Node.js version, source and destination layout, options, and link targets when investigating the report or preparing a new issue. Those details are needed to compare your result with the reported case.
Rank #3
- Easily store and access 2TB to content on the go with the Seagate Portable Drive, a USB external hard drive
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
Module symlink flags do not change fs.cpSync
Node.js flags such as --preserve-symlinks and --preserve-symlinks-main affect module loading and module path resolution; they do not configure filesystem copying and will not make fs.cpSync dereference a link. If you also have import or dependency-resolution problems, consult the Node.js CLI documentation for the flags’ scope. It notes that loading linked native modules from more than one location can cause them to be treated as separate modules and fail to load.
Quick Recap
Best Value
- Easily store and access 5TB of content on the go with the Seagate portable drive, a USB external hard Drive
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
Rank #4
- NEARLY 2X FASTER THAN OUR PREVIOUS GENERATION(8) – move 1,000 high-res photos in under 60 seconds(6) with up to 2000MB/s transfer speeds(2).
- IP65 RATING AND UP TO 3M DROP PROTECTION(3) – protects against spills and drops.
- POCKET-SIZED – fits easily in pockets and small bags.
- SPACE TO OWN YOUR AI CONTENT – speed and capacity to download your high-res clips and photo edits.
- 256-BIT AES ENCRYPTION(4) – helps keep private files secure with password protection.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

