eslint tip is:
error 'react' should be listed in the project's dependencies. Run 'npm i -S react' to add it import/no-extraneous-dependencies
error 'react-dom' should be listed in the project's dependencies. Run 'npm i -S react-dom' to add it import/no-extraneous-dependencies
bug react and react-dom is in my package.json
my version is [email protected]
What file is erroring? What syntax is in the file? Is react and react-dom in dependencies, or in devDeps?
Possible duplicate of #1289.
What file is erroring? What syntax is in the file? Is react and react-dom in _dependencies_, or in devDeps?
Hi thanks for your reply
react and react-dom are in dependencies and my code file is:
import React from 'react';
import dom from 'react-dom';
I resolve this problem after upgrading to version 2.16.0
and, adding this configuration:
"import/no-extraneous-dependencies": [
"error", {
"packageDir": "./"
}
]
Most helpful comment
Hi thanks for your reply
react and react-dom are in dependencies and my code file is:
import React from 'react'; import dom from 'react-dom';I resolve this problem after upgrading to version 2.16.0
and, adding this configuration:
"import/no-extraneous-dependencies": [ "error", { "packageDir": "./" } ]