The strapi doesn't work on admin mode

System Information
  • Strapi Version: 4.3.8
  • Operating System: MacOS Monterey
  • Database: SQLite
  • Node Version: 14.19.1
  • NPM Version: 6.14.16
  • Yarn Version: 1.22.19

When I run yarn develop --watch-admin the strapi is not run.


When I run the yarn develop it works successfully.

I’ve tried removing the node_modules folder and run yarn again
I’ve tried deleting the .cache folder and run yarn build and yarn develop again
but it’s not working.

I don’t know what I do about this error. Can somebody help me, please?

Hey @michel_martins,

Close the current terminal tab/window and create a new one.

I’ve had a similar issue with --watch-admin. It appears to leave a process in the background that is still running when you cancel it (Ctrl+C). You may need to clean the directory by deleting the .cache directory before you run yarn develop --watch-admin again.

If this still fails, you may need to find the process running on the port and kill it. In terminal:

lsof -i:8000
<get process id>
kill -9 <process-id>

Hi @dallasclark

I’ve finished the terminal and created a new one. Also, I restarted my computer. It doesn’t work.
I’ve run the commands that you say, I’ve checked the ports again, but the error persists.

Sorry, I just read the errors in full. I may have taken you on a path to nowhere.

What command are you running to install your Node dependencies? Have you tried Node v16?

Can you please supply the contents of your package.json file?

Be sure to clear .cache and node_modules after every Node version change and dependencies installation.

No problems.

I changed to node 16.17.1.

I’ve used yarn to install the node dependencies.
My package.json file:

{
  "name": "app-name",
  "private": true,
  "version": "0.1.0",
  "description": "A Strapi application",
  "scripts": {
    "develop": "strapi develop",
    "start": "strapi start",
    "build": "strapi build",
    "strapi": "strapi",
    "cs": "config-sync"
  },
  "devDependencies": {},
  "dependencies": {
    "@strapi/plugin-i18n": "4.3.8",
    "@strapi/plugin-users-permissions": "4.3.8",
    "@strapi/strapi": "4.3.8",
    "better-sqlite3": "7.4.6",
    "strapi-plugin-config-sync": "^1.0.4",
    "strapi-plugin-menus": "^1.0.2"
  },
  "author": {
    "name": "A Strapi developer"
  },
  "strapi": {
    "uuid": "c13d46a1-152a-44f1-a7df-53484248edc3"
  },
  "engines": {
    "node": ">=14.19.1 <=16.x.x",
    "npm": ">=6.0.0"
  },
  "license": "MIT"
}

Yes, I clear .cache and node_modules after every changes or instalattion.