Skip to content

Commit dd60cb5

Browse files
Fix: __dirname is not defined error in ESM modules (fixes #1)
- Added proper __dirname definition for ES modules in install.js - Fixed installation failure on WSL2 and other environments - Bumped version to 1.0.2
1 parent 010c9fe commit dd60cb5

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@webdevtoday/claude-agents",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "Supercharge Claude Code with specialized AI sub-agents for code review, testing, debugging, documentation & more. Easy CLI tool to install, manage & create custom AI agents for enhanced development workflow",
55
"main": "src/index.js",
66
"type": "module",

src/commands/install.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import chalk from 'chalk';
22
import ora from 'ora';
33
import { writeFileSync, copyFileSync, existsSync } from 'fs';
4-
import { join } from 'path';
4+
import { join, dirname } from 'path';
5+
import { fileURLToPath } from 'url';
56
import {
67
getAgentsDir,
78
getCommandsDir,
@@ -24,6 +25,9 @@ import {
2425
formatAgentForInstall
2526
} from '../utils/agents.js';
2627

28+
const __filename = fileURLToPath(import.meta.url);
29+
const __dirname = dirname(__filename);
30+
2731
export async function installCommand(options) {
2832
const spinner = ora();
2933

0 commit comments

Comments
 (0)