Error installing dependencies with new version of opensaas
Hello guys. Having this issue when i started a new project with the opensaas. Got this:
That is a more detailed log i got from the npm logs files. I know it have something to d with resolving dependencies and i have faced it before in other environments. But since in wasp its cli commands takes care of installing i wonder how one should approach such thing? And if someone faced something similar with opensaas lately before i get to spend time on it. I tried to update the version of the package but no success.
7 Replies
Hi @Stefan Vitória. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
This issue you're experiencing is related to dependency conflicts in the OpenSaaS template for Wasp. It appears that there's a mismatch between the required versions of
apexcharts
and react-apexcharts
. Let's break down the problem and potential solutions:
1. The error suggests that react-apexcharts@1.6.0
requires apexcharts@>=4.0.0
, but the project is using apexcharts@3.54.1
.
2. In Wasp projects, dependencies are typically managed through the package.json
file at the root of your project, as described in the Wasp documentation on dependencies (https://wasp-lang.dev/docs/project/dependencies).
3. The OpenSaaS template might have outdated or conflicting dependency versions specified in its package.json
file.
To resolve this issue, you can try the following steps:
1. First, try running wasp clean
followed by wasp start
again, as suggested in a similar troubleshooting scenario on Discord (https://discord.com/channels/686873244791210014/1204021576979324949). This might resolve the issue if it's due to a temporary state.
2. If that doesn't work, you might need to manually update the dependencies in your project's package.json
file. Specifically, try updating the versions of apexcharts
and react-apexcharts
to compatible versions. For example:
3. After updating the package.json
, run wasp clean
and then wasp start
again.
4. If you're still encountering issues, you might need to use one of the npm flags mentioned in the error message, such as --legacy-peer-deps
. However, this should be a last resort and used cautiously as it might lead to other issues.
It's worth noting that Wasp is working on improving dependency management. As mentioned in a GitHub issue comment (https://github.com/wasp-lang/wasp/issues/1324#issuecomment-1183175092), a future version of Wasp will make dependency installation go via npm
, which should make handling such conflicts easier and more familiar to developers.
If these steps don't resolve your issue, you might want to report this specific problem to the OpenSaaS or Wasp team, as it could be a bug in the template that needs addressing.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Stefan Vitória, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?@Vinny (@Wasp) one for you - I guess
react-apexcharts
require apexcharts
to be installed as well?
React Apexcharts 1.6.0 require Apexcharts 4.0.0 or greater. React Apexcharts 1.5.0 dont: https://github.com/apexcharts/react-apexcharts/commit/39533ce4796d9e1b5dd0fc1de2b7869b3b4c1664
Solutions: downgrade to using react-apexcharts@1.5.0
or upgrade apexcharts
dep in your package.json
.Hey Stefan. Yeah I had this problem recently and updated the template.
remove the carat symbol ^ from the dependencies in your package.json if you don't want to upgrade:
I have updated them to the latest version i guess and it appear to solve the problem. Thanks.
Nice
Yeah, I actually ended up upgrading it. Thanks
"react-apexcharts": "^1.6.0",
"apexcharts": "^4.1.0",
did the same. Thanks for sharing.