Warnings with the hapi library

Viewed 1132

I am presenting many warnings when installing things in my project because of this:

warning @hapi/hapi > @hapi/joi@17.1.1: joi is leaving the @hapi organization and moving back to 'joi' 
(https://github.com/sideway/joi/issues/2411)
warning @hapi/hapi > @hapi/catbox > @hapi/joi@17.1.1: joi is leaving the @hapi organization and 
moving back to 'joi' (https://github.com/sideway/joi/issues/2411)
warning @hapi/hapi > @hapi/joi > @hapi/formula@2.0.0: This version has been deprecated and is no 
longer supported or maintained
warning @hapi/hapi > @hapi/heavy > @hapi/joi@17.1.1: joi is leaving the @hapi organization and moving 
back to 'joi' (https://github.com/sideway/joi/issues/2411)
warning @hapi/hapi > @hapi/shot > @hapi/joi@17.1.1: joi is leaving the @hapi organization and moving 
back to 'joi' (https://github.com/sideway/joi/issues/2411)
warning @hapi/hapi > @hapi/statehood > @hapi/joi@17.1.1: joi is leaving the @hapi organization and 
moving back to 'joi' (https://github.com/sideway/joi/issues/2411)
warning @hapi/hapi > @hapi/podium > @hapi/joi@17.1.1: joi is leaving the @hapi organization and 
moving back to 'joi' (https://github.com/sideway/joi/issues/2411)
warning @hapi/hapi > @hapi/teamwork@4.0.0: This version has been deprecated and is no longer 
supported or maintained
warning @hapi/hapi > @hapi/podium > @hapi/teamwork@4.0.0: This version has been deprecated and is no 
longer supported or maintained

Check other similar questions in SO and it didn't work for me, this is package.json (I already modified Joi) I have modified the package-lock.json, I have made the ncu -u to check outdated dependencies, I install them and it doesn't work either

 "dependencies": {
"@capacitor-community/fcm": "^1.0.8",
"@capacitor/android": "^2.4.0",
"@capacitor/cli": "^2.4.0",
"@capacitor/core": "^2.4.0",
"@capacitor/ios": "^2.4.0",
"@hapi/formula": "^3.0.0",
"@hapi/hapi": "^19.2.0",
"@hapi/teamwork": "^5.1.0",
"@hapi/topo": "^5.0.0",
"@ionic/core": "^5.3.1",
"@ionic/pwa-elements": "^3.0.1",
"@ionic/react": "^5.3.1",
"@ionic/react-router": "^5.3.1",
"@sentry/browser": "^5.20.1",
"@testing-library/dom": "^7.21.5",
"@testing-library/jest-dom": "^5.11.1",
"@testing-library/react": "^10.4.7",
"@testing-library/user-event": "^12.0.15",
"@types/history": "^4.7.7",
"@types/jest": "^26.0.7",
"@types/jsonwebtoken": "^8.5.0",
"@types/lodash": "^4.14.158",
"@types/node": "^14.0.26",
"@types/pouchdb": "^6.4.0",
"@types/react": "^16.9.43",
"@types/react-dom": "^16.9.8",
"@types/react-router": "^5.1.8",
"@types/react-router-dom": "^5.1.5",
"@types/react-tracking": "^7.0.4",
"@typescript-eslint/eslint-plugin": "^3.7.1",
"@typescript-eslint/parser": "^3.7.1",
"axios": "^0.19.2",
"caniuse-lite": "^1.0.30001107",
"chokidar": "^3.4.1",
"eslint": "^7.5.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.4",
"firebase": "^7.17.1",
"immer": "7.0.7",
"ionicons": "^5.1.2",
"joi": "^17.1.1",
"jsonwebtoken": "^8.5.1",
"lodash": "^4.17.19",
"moment": "^2.27.0",
"node-sass": "^4.14.1",
"npm-check-updates": "^7.0.2",
"pouchdb": "^7.2.2",
"prettier": "^2.0.5",
"prop-types": "^15.7.2",
"react": "^16.13.1",
"react-app-rewire-workbox": "^2.0.1",
"react-app-rewired": "^2.1.6",
"react-dom": "^16.13.1",
"react-redux": "^7.2.1",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"react-scripts": "3.4.1",
"react-tracking": "^7.3.0",
"redux": "^4.0.5",
"redux-thunk": "^2.3.0",
"source-map-resolve": "^0.6.0",
"typescript": "3.9.7",
"unstated-typescript": "2.1.7",
"urix": "^0.1.0",
"webpack": "^4.44.0",
"workbox-build": "^5.1.3",
"workbox-webpack-plugin": "^5.1.3"
},
"scripts": {
"start": "react-app-rewired start",
"build": "react-app-rewired build",
"test": "react-app-rewired test",
"eject": "react-app-rewired eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
  ">0.2%",
  "not dead",
  "not op_mini all"
],
"development": [
  "last 1 chrome version",
  "last 1 firefox version",
  "last 1 safari version"
]
},
"optionalDependencies": {
"fsevents": "^2.1.3"
}
}
1 Answers

As stated here link, Joi modules are moved over some other place and as for now you are required to change your package.json file and require statements. If that doesn't work try reversing back to old way of using Joi and see if that works. It did in my case

Or try uninstalling @hapi/joi and install it with npm i joi or yarn add joi

Related