Node.js v24 upgraded to OpenSSL 3.x, which introduced stricter cipher requirements and different default providers. When running in WSL, there's a compatibility issue between:
- Node.js v24's OpenSSL 3.x implementation
- WSL's kernel/filesystem handling of cryptographic operations
- npm's package extraction process (which uses encryption for tar.gz files)
The cipher operation fails during package decompression, preventing successful installation.
### Solution
**Quick Fix (Recommended):**
Use the provided Makefile, which includes the workaround:
```bash
make install
```
**Manual Fix:**
If not using the Makefile, set the `NODE_OPTIONS` environment variable before running npm:
```bash
export NODE_OPTIONS="--openssl-legacy-provider"
npm install
```
**Permanent Fix (for your shell session):**
Add to your `~/.bashrc` or `~/.zshrc`:
```bash
export NODE_OPTIONS="--openssl-legacy-provider"
```
Then reload your shell:
```bash
source ~/.bashrc
```
### Step-by-Step Recovery
If you're in a broken state with partial installation:
1.**Clean everything:**
```bash
rm -rf node_modules package-lock.json
npm cache clean --force
```
2.**Install with workaround:**
```bash
export NODE_OPTIONS="--openssl-legacy-provider"
npm install
```
3.**Verify installation:**
```bash
npm test
```
Should show: `58 passed (58)` across 3 test files
### Alternative Solutions
**Option A: Use Node.js v22 (LTS)**
If you don't need Node.js v24 features:
```bash
# Using nvm (Node Version Manager)
nvm install 22
nvm use 22
npm install
```
Node.js v22 uses OpenSSL 1.1.1 and doesn't have this issue.
**Option B: Use npm's legacy peer deps flag**
Sometimes combining flags helps:
```bash
export NODE_OPTIONS="--openssl-legacy-provider"
npm install --legacy-peer-deps
```
### Prevention
**For New Projects:**
Update your project's documentation and Makefile to include the workaround automatically. See the current `Makefile` for reference.
**For CI/CD:**
Add to your CI configuration:
```yaml
# GitHub Actions example
env:
NODE_OPTIONS: "--openssl-legacy-provider"
# GitLab CI example
variables:
NODE_OPTIONS: "--openssl-legacy-provider"
```
### Verification
After applying the fix, verify with:
```bash
# Check Node.js version
node --version # Should show v24.x.x
# Check installation succeeded
ls -la node_modules | head -5
# Run tests to confirm everything works
npm test
# Expected output:
# ✓ Test Files 3 passed (3)
# ✓ Tests 58 passed (58)
```
### Related Issues
- **esbuild ETXTBSY errors**: Often occur together with SSL cipher errors. The same solution fixes both.
- **Vitest installation failures**: Vitest depends on esbuild, so the fix resolves Vitest installation issues too.
### When This Won't Help
This solution specifically addresses Node.js v24 + OpenSSL 3.x + WSL issues. It won't help with:
- Network connectivity problems (check `npm config get registry`)
- Permissions issues (avoid `sudo npm install`, use `nvm` instead)
- Disk space problems (check with `df -h`)
- Corrupted npm cache (run `npm cache verify`)
---
## CORS Errors When Loading Timeline
### Problem Description
**Symptoms:**
- Opening `index.html` directly in browser (file:// protocol)
- Console shows CORS errors when trying to load CSV, CSS, or SVG files
- Uploaded project.json but CSV/SVG/CSS files don't load
- Have to manually select each file individually
- Timeline doesn't render after selecting project.json
### Solution
This is expected behavior due to browser security restrictions. When you upload a single project.json file, the browser doesn't allow automatic access to other files in the same directory.
**Use the Folder Picker (Recommended):**
1. Click **"📂 Load Project Folder"** (blue button at top of file manager)
2. Select the entire project folder
3. All files will be loaded automatically
This works because you're explicitly granting permission to access all files in the folder.
**Alternative:** Load files individually using the separate upload buttons for CSV, SVG, and CSS.
**For developers running from local server:** Files auto-load when served via HTTP (no manual upload needed).