[Vuejs]-Setting up lint-staged generates a file with a number containing information about installed packages

0πŸ‘

mrmβ€˜s lint-staged preset attempts to install husky and lint-staged, using >= version specifiers, as in:

npm install -D lint-staged@>=10 husky@>=6
                                      πŸ‘†

The last > symbol in the command causes a redirection to a file of the specified name (in this case, it’s named 6) in certain Windows shells, including CMD, Git Bash, and PowerShell. WSL is not affected by this problem.

You can workaround the issue in PowerShell by manually installing those dependencies beforehand with the problematic arguments surrounded by triple-quotes:

npm i -D """lint-staged@>=10""" """husky@>=6"""

Then, when you run npx mrm@2 lint-staged, mrm will skip the installation of those packages (bypassing the problem), and perform the rest of the preset steps.

Leave a comment