I'm using eslint and getting this error because of
'react' should be listed in the project's dependencies. Run 'npm i -S react' to add it
AFAIK, there isn't an option to reference a parent
package.json (see also this issue), because
npm assumes self-contained, independent packages.
So if you want to get it working properly, you'll have to list all dependencies for each component in their respective
package.json file, basically making each component an independent package.
That, or work around the reason why you need separate
package.json files for each component.