Atom安装atom-bootstrap4插件后加载报错:重复键‘Button group - Bootstrap 4’
Don’t worry—this isn’t your fault! That error is a bug in the atom-bootstrap4 plugin itself, caused by duplicate snippet entries sharing the same key name ("Button group - Bootstrap 4"). Your installation steps were totally correct (using apm install atom-bootstrap4 and restarting Atom is the right process), so the issue lies with the plugin’s code, not your actions.
Here are two straightforward fixes:
Option 1: Manually Remove the Duplicate Snippet
- Navigate to your
.atom/packages/atom-bootstrap4directory (this is where the plugin is installed on your system). - Locate the
snippetsfolder inside the plugin directory. - Open the snippet file (likely named
bootstrap4-snippets.cson) in Atom or any text editor. - Search for the line containing
"Button group - Bootstrap 4"—you’ll find two identical entries. Delete one of them. - Save the file and restart Atom. The error should vanish, and the plugin’s auto-completion should work as expected.
Option 2: Switch to a Well-Maintained Alternative Plugin
If you’d rather avoid editing plugin files manually, try using a more actively maintained Bootstrap 4 snippet plugin for Atom. For example, install bootstrap4-snippets via the command:
apm install bootstrap4-snippets
This plugin is less likely to have unaddressed duplicate key issues and should provide reliable Bootstrap class auto-completion.
内容的提问来源于stack exchange,提问作者Dev.Gloku

