Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Duplicate export name 'CLI' causes SyntaxError and Module '"@stacksjs/clapp"' has no exported members #5

@andrewcwhy

Description

@andrewcwhy

Describe the bug

SyntaxError: Cannot export a duplicate name 'CLI'. at <parse> (node_modules/@stacksjs/clapp/dist/src/index.js:3310:1)
This appears to be caused by a duplicate export { CLI } statement in the compiled output of the package (dist/src/index.js). This breaks my cli project that imports from @stacksjs/clapp and tries to execute CLI commands.

'"@stacksjs/clapp"' has no exported member named 'command'. Did you mean 'Command'?ts(2724) Command.d.ts(21, 14): 'Command' is declared here.

Reproduction

bun src/index.ts

Example Code

import { cli, command, prompt, style  } from "@stacksjs/clapp";  const app = cli({ 	name: "cli", 	description: "init cli", 	version: "0.0.0", });  command("init") 	.description("Initialize a new project") 	.action(async () => { 		// Ask for project name 		const name: string = await prompt.text("Project name:", { 			placeholder: "your-app-name", 			default: "my-app", 			validate: (value: string): true | string => 				value.length > 0 || "Name cannot be empty", 		});  		const template = await prompt.select("Select a template:", [ 			{ label: "React", value: "react" }, 		]);  		const bundler = await prompt.select("Select a bundler:", [ 			{ label: style.green("Vite"), value: "vite" }, 		]);  		const features = await prompt.multiselect("Select features:", [ 			{ label: "ESLint", value: "eslint" }, 		]);  		const packageManager = await prompt.multiselect( 			"Select a package manager:", 			[ 				{ name: "bun", value: "bun", checked: true }, 				{ name: "npm", value: "npm" }, 			], 		);  		console.log(`Creating ${template} project: ${name}`); 		console.log(`Creating ${bundler}`); 		console.log(`Selected features: ${features.join(", ")}`); 		console.log(`Creating ${packageManager} project: ${name}`);  		// Implementation would go here... 	});  app.run();

System Info

Package Name: @stacksjs/clapp
Bun Version: v1.2.12
OS: Windows 10 x64
Project Setup: Monorepo using Bun (with TypeScript + ESM)

Used Package Manager

bun

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions