How should I install the plugin in eslint

0

I want to install the eslint-plugin-jsx-ally but I get this error

> [email protected] postinstall 

what should I do

    
asked by 07.12.2017 в 23:00
source

1 answer

0

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')
    
answered by 08.12.2017 в 00:35