Hello,
We are using a very old version of prime react but it is also all heavily used through out and we cant do an upgrade right now. There is a component Id like to use in your latest version. How can I either use that one component or install the latest version of primereact along side of the old version?
Side by Side Install
I am not sure if that is possible to have side by side install. Especially if you are using Create React App or Next.js as the package.json only allows for 1 version.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
You can alias an install and install side by side but primereact doesn't seem to support that.
for instance, we have primereact 3.1.7 installed, to install the latest version in parallel you would do:
So I went ahead and did that, i have it installed side by side. I then do my imports:
And add my component:
And I get this error:
Is there anything I could do to get around this?
for instance, we have primereact 3.1.7 installed, to install the latest version in parallel you would do:
Code: Select all
"primereact_9_3_0": "npm:primereact@^9.3.0",
Code: Select all
import { MultiSelect } from "primereact_9_3_0/multiselect"
Code: Select all
<MultiSelect options={cities} placeholder="Select Cities" onChange={(e) => setSelectedCities(e.value)} />
I think this happens because primereact doesnt refer to itself as this aliased version, it refers to itself as primereact so the new version calls the old version ehich is installed in the package.json as:./node_modules/primereact_9_3_0/multiselect/multiselect.esm.js
Module not found: Can't resolve 'primereact/api' in 'C:\Dev\App\ClientApp\node_modules\primereact_9_3_0\multiselect'
Code: Select all
"primereact": "^3.1.7",
-
- Information
-
Who is online
Users browsing this forum: No registered users and 4 guests