Closed sgehrman closed 2 years ago
I am facing the same issue
@sgehrman how is this bug presenting? What are your steps to display reproduce errors?
I don't know why this just started happening today. I'm building a nextjs project.
info - Linting and checking validity of types
info - Creating an optimized production build
info - Compiled successfully
info - Collecting page data ..Error: Cannot mix different versions of joi schemas
at new module.exports (/home/steve/Documents/GitHub/mavrik/fe-infinity/node_modules/@hapi/hoek/lib/error.js:23:19)
at module.exports (/home/steve/Documents/GitHub/mavrik/fe-infinity/node_modules/@hapi/hoek/lib/assert.js:21:11)
at Object.exports.isSchema (/home/steve/Documents/GitHub/mavrik/fe-infinity/node_modules/@web3-onboard/core/node_modules/joi/lib/common.js:132:5)
at Object.internals.schema (/home/steve/Documents/GitHub/mavrik/fe-infinity/node_modules/@web3-onboard/core/node_modules/joi/lib/compile.js:66:16)
at Object.exports.schema (/home/steve/Documents/GitHub/mavrik/fe-infinity/node_modules/@web3-onboard/core/node_modules/joi/lib/compile.js:17:26)
at internals.Base.$_compile (/home/steve/Documents/GitHub/mavrik/fe-infinity/node_modules/@web3-onboard/core/node_modules/joi/lib/base.js:645:24)
at /home/steve/Documents/GitHub/mavrik/fe-infinity/node_modules/@web3-onboard/core/node_modules/joi/lib/types/keys.js:260:92
at Object.exports.tryWithPath (/home/steve/Documents/GitHub/mavrik/fe-infinity/node_modules/@web3-onboard/core/node_modules/joi/lib/common.js:176:16)
at internals.Base.method [as keys] (/home/steve/Documents/GitHub/mavrik/fe-infinity/node_modules/@web3-onboard/core/node_modules/joi/lib/types/keys.js:260:32)
at Object.args (/home/steve/Documents/GitHub/mavrik/fe-infinity/node_modules/@web3-onboard/core/node_modules/joi/lib/types/keys.js:49:23) {
path: 'namespace'
}
The same case with me. I have been working on the project for the past 2 weeks, and it was working fine, but just after I deleted my node_modules
folder and built my project again this error appeared. Now I can't even run yarn dev
@sgehrman For now I found a fix in order to build.
yarn.lock
and the node_modules
foldernpm install
npm dedupe
(The Fix 🥇 )npm run build
Note: this method didn't work with yarn
for me.
Let me know if this works for, I just made it work using this. I hope the dev team fix the issue asap.
@Maadhav Working on a fix now, will notify when a alpha packages are published to test with
@Maadhav @sgehrman I have alpha versions published with patch version bumps, please check out https://github.com/blocknative/web3-onboard/pull/1290 for version changes and you can test with those versions. A Team member will update here when official versions are released
how soon until the official? Tonight would be helpful.
Is this issue fixed? I am getting the same error, but when the build is done in vercel. However, the build is successful while running it locally.
A release of the latest merge would be really helpful. Facing the same issue of multiple joi
versions for my react native app.
Sharing logs from my project:
[4/4] 🚡 Calculating file sizes...
=> Found "joi@17.6.1"
info Has been hoisted to "joi"
info Reasons this module exists
- Hoisted from "@web3-onboard#common#joi"
- Hoisted from "@web3-onboard#gas#joi"
- Hoisted from "@web3-onboard#injected-wallets#joi"
- Hoisted from "@web3-onboard#magic#joi"
- Hoisted from "react-native#@react-native-community#cli#joi"
- Hoisted from "@web3-onboard#dcent#@web3-onboard#hw-common#joi"
- Hoisted from "@web3-onboard#portis#@web3-onboard#common#joi"
info Disk size without dependencies: "600KB"
info Disk size with unique dependencies: "920KB"
info Disk size with transitive dependencies: "920KB"
info Number of shared dependencies: 5
=> Found "@web3-onboard/core#joi@17.6.0"
info This module exists because "@web3-onboard#react#@web3-onboard#core" depends on it.
info Disk size without dependencies: "596KB"
info Disk size with unique dependencies: "916KB"
info Disk size with transitive dependencies: "916KB"
info Number of shared dependencies: 5
Fixed and released in v2.12.0
Current Behavior
Cannot mix different versions of joi schemas
Expected Behavior
should work
Steps To Reproduce
do stuff
What package is effected by this issue?
@web3-onboard/core
Is this a build or a runtime issue?
Build
Package Version
2.8.4
Node Version
17
What browsers are you seeing the problem on?
Chrome
Relevant log output
Anything else?
No response
Sanity Check