DEV Community

Discussion on: How to publish a custom React component to NPM using Create React Library

Collapse
 
manojap profile image
MANOJ AP

After the completion I tried to import the module and got this error

registry Using stale data from registry.npmjs.org/ because the host is inaccessible -- are you offline?
npm WARN registry Using stale data from registry.npmjs.org/ due to a request error during revalidation.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: test@0.1.0
npm ERR! Found: react@15.7.0
npm ERR! node_modules/react
npm ERR! react@"^15.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.0.0" from @codehat/react-loader@1.0.0
npm ERR! node_modules/@codehat/react-loader
npm ERR! @codehat/react-loader@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\manoj\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\manoj\AppData\Local\npm-cache_logs\2021-07-04T03_13_04_581Z-debug.log