I want to install the eslint-plugin-jsx-ally but I get this error
> [email protected] postinstall
what should I do
I want to install the eslint-plugin-jsx-ally but I get this error
> [email protected] postinstall
what should I do
It is (unfortunately) common that in the npm registry some people publish packages with names similar to an existing one so that someone accidentally installs them (and they are potentially harmful packages).
Other times someone unpublishes a package and quickly another developer publishes a package with the name that has just been released, capturing those who have that package among its dependencies.
Apparently your case is simply that the package eslint-plugin-jsx-ally is not the right one, but you should install eslint-plugin-jsx-a11y .
To make sure that nobody installed the first one, the author purposely put an error in the hook postinstall
.
Reviewing:
npm view eslint-plugin-jsx-ally
the hook postinstall
explicitly calls node ./postinstall.js
whose content is just
throw new Error('This is the wrong package! Please install eslint-plugin-jsx-a11y')