chrisrzhou / react-wordcloud

☁️ Simple React + D3 wordcloud component with powerful features.
https://react-wordcloud.netlify.app
MIT License
208 stars 133 forks source link

install error #96

Open dotnetclassic opened 2 years ago

dotnetclassic commented 2 years ago

When i try to run npm install react-worldcloud

Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS D:\workspace\react-typescript\simple-app> npm install react-worldcloud npm WARN config global --global, --local are deprecated. Use --location=global instead. npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: @testing-library/react@13.3.0 npm ERR! Found: react@16.13.0 npm ERR! node_modules/react npm ERR! peer react@">= 16" from react-scripts@5.0.1 npm ERR! node_modules/react-scripts npm ERR! react-scripts@"5.0.1" from the root project npm ERR! react@"^16.13.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^18.0.0" from @testing-library/react@13.3.0 npm ERR! node_modules/@testing-library/react npm ERR! @testing-library/react@"^13.3.0" from the root project npm ERR! npm ERR! Conflicting peer dependency: react@18.2.0 npm ERR! node_modules/react npm ERR! peer react@"^18.0.0" from @testing-library/react@13.3.0 npm ERR! node_modules/@testing-library/react npm ERR! @testing-library/react@"^13.3.0" 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\dotne\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\dotne\AppData\Local\npm-cache_logs\2022-08-11T16_09_25_076Z-debug-0.log

pthalamy commented 2 years ago

@dotnetclassic this package hasn't been updated to use react@^18.0.0 as a peer dependency. However, it still works fine without issue with React 17 and later, so you can just force the install with:

npm install react-worldcloud --legacy-peer-deps or npm install react-worldcloud --force

dotnetclassic commented 2 years ago

@dotnetclassic this package hasn't been updated to use react@^18.0.0 as a peer dependency. However, it still works fine without issue with React 17 and later, so you can just for the install with:

npm install react-worldcloud --legacy-peer-deps or npm install react-worldcloud --force

yeah fixed thx