https://bugs.kde.org/show_bug.cgi?id=494235
Bug ID: 494235 Summary: Formatting Plugin need npm and prettier to be installed Classification: Applications Product: kate Version: 23.08.5 Platform: Ubuntu OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: kwrite-bugs-n...@kde.org Reporter: if.gnu.li...@gmail.com Target Milestone: --- SUMMARY The "Formatting" plugin, which is described as a plugin for formatting code, requires npm to be installed in the system. However, npm is not included in Kubuntu as a default package. So, if a Kate user enables the plugin and trigger it by saving changes, the "Output" status panel shows "[... Format Error] /bin/sh: 1: npm: not found". As far as I can find, the source of the problem is the "Formatting" plugin calls prettier_script.js[1], which can be installed by npm i prettier Although there is a line [2] that warns the user to install node and prettier [3], there was not such a warning either when I enabled the plugin or saved a file after eneabling the plugin. Note: I am not a developer and I don't know any programming language. STEPS TO REPRODUCE 1. Open a document in Kate 2. Enable Formatting plugin: Settings>Configure Kate>Plugins> Check Formatting 3. Save the file via Menu>File>Save or by CTRL+S shortcut (you don't need to change anything) OBSERVED RESULT "Output" status panel shows "[... Format Error] /bin/sh: 1: npm: not found". EXPECTED RESULT SOFTWARE/OS VERSIONS Linux/KDE Plasma: Kubuntu KDE Plasma Version: 5.27.11 KDE Frameworks Version: 5.115.0 Qt Version: 5.15.13 ADDITIONAL INFORMATION [1] https://invent.kde.org/utilities/kate/-/blob/master/addons/format/prettier_script.js?ref_type=heads [2] https://invent.kde.org/utilities/kate/-/blob/master/addons/format/Formatters.cpp?ref_type=heads#L221 [3] https://www.npmjs.com/package/prettier -- You are receiving this mail because: You are watching all bug changes.