Troubleshooting dependencies from Command Line
M
Michael Staton
I'm getting all these error messages that say "unmet peer dependency." You should have documentation on how to resolve this (even if it means reminding us of package manager basics.)
Basically, Strapi can't find the version of React it's looking for. It's hard for me to dissect the log, looks like @bn-digital/strapi-plugin-field-uuid > @strapi/design-system@1.14.1" has unmet peer dependency "react-dom@^17.0.0 || ^18.0.0".
I should know what I'm doing and have zero problems. I might be rusty on the the technicalities of yarn, npm, forcing installs, installing globally, etc.
Also, it could be an error from a plugin that I stalled a while ago. However, I have no idea what would happen to my project if I just took those plugins out.
It's also not clear at all what would happen to your database and your JSON files if I just "reinstalled" Strapi.
M
Michael Staton
Now I'm getting this: 14:49:14 ~/code/colearn/contentGraph master $ yarn develop >> output.txt
warning ../../../package.json: No license field
node:internal/modules/cjs/loader:1080
throw err;
^
Error: Cannot find module 'react-dom/server'
Require stack:
- /Users/mps/code/colearn/contentGraph/node_modules/@strapi/admin/dist/_chunks/index-sNH2VWbC.js
- /Users/mps/code/colearn/contentGraph/node_modules/@strapi/admin/dist/cli.js
- /Users/mps/code/colearn/contentGraph/node_modules/@strapi/admin/index.js
- /Users/mps/code/colearn/contentGraph/node_modules/@strapi/strapi/dist/commands/actions/watch-admin/action.js
- /Users/mps/code/colearn/contentGraph/node_modules/@strapi/strapi/dist/commands/actions/watch-admin/command.js
- /Users/mps/code/colearn/contentGraph/node_modules/@strapi/strapi/dist/commands/index.js
- /Users/mps/code/colearn/contentGraph/node_modules/@strapi/strapi/dist/cli.js
- /Users/mps/code/colearn/contentGraph/node_modules/@strapi/strapi/bin/strapi.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
at Module._load (node:internal/modules/cjs/loader:922:27)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at require (node:internal/modules/cjs/helpers:110:18)
at Object.<anonymous> (/Users/mps/code/colearn/contentGraph/node_modules/@strapi/admin/dist/_chunks/index-sNH2VWbC.js:16:16)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Module.require (node:internal/modules/cjs/loader:1143:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/mps/code/colearn/contentGraph/node_modules/@strapi/admin/dist/_chunks/index-sNH2VWbC.js',
'/Users/mps/code/colearn/contentGraph/node_modules/@strapi/admin/dist/cli.js',
'/Users/mps/code/colearn/contentGraph/node_modules/@strapi/admin/index.js',
'/Users/mps/code/colearn/contentGraph/node_modules/@strapi/strapi/dist/commands/actions/watch-admin/action.js',
'/Users/mps/code/colearn/contentGraph/node_modules/@strapi/strapi/dist/commands/actions/watch-admin/command.js',
'/Users/mps/code/colearn/contentGraph/node_modules/@strapi/strapi/dist/commands/index.js',
'/Users/mps/code/colearn/contentGraph/node_modules/@strapi/strapi/dist/cli.js',
'/Users/mps/code/colearn/contentGraph/node_modules/@strapi/strapi/bin/strapi.js'
]
}
Node.js v18.17.0
error Command failed with exit code 1.
M
Michael Staton
it looks like actually the "engines" had a version range of node that was out of date. I don't know if changing it will mess things up or not. Having a page where you should say "this is the exact package.json file you need to get back up and running after an upgrade" would be very helpful.