naskio / docker-strapi

Docker image for strapi v4 (latest version)
https://hub.docker.com/r/naskio/strapi
MIT License
142 stars 49 forks source link

Latest image not working #22

Open manuelmanharta1 opened 9 months ago

manuelmanharta1 commented 9 months ago

When I fetch the latest image, this is not working, neither latest-alpine nor latest. I tried to start a fresh installation and I get following error:

Attaching to strapi-1 strapi-1 | node:internal/modules/cjs/loader:1137 strapi-1 | throw err; strapi-1 | ^ strapi-1 | strapi-1 | Error: Cannot find module 'react' strapi-1 | Require stack: strapi-1 | - /usr/local/share/.config/yarn/global/node_modules/@strapi/admin/dist/_chunks/index-sNH2VWbC.js strapi-1 | - /usr/local/share/.config/yarn/global/node_modules/@strapi/admin/dist/cli.js strapi-1 | - /usr/local/share/.config/yarn/global/node_modules/@strapi/admin/index.js strapi-1 | - /usr/local/share/.config/yarn/global/node_modules/@strapi/strapi/dist/commands/actions/watch-admin/action.js strapi-1 | - /usr/local/share/.config/yarn/global/node_modules/@strapi/strapi/dist/commands/actions/watch-admin/command.js strapi-1 | - /usr/local/share/.config/yarn/global/node_modules/@strapi/strapi/dist/commands/index.js strapi-1 | - /usr/local/share/.config/yarn/global/node_modules/@strapi/strapi/dist/cli.js strapi-1 | - /usr/local/share/.config/yarn/global/node_modules/@strapi/strapi/bin/strapi.js strapi-1 | at Module._resolveFilename (node:internal/modules/cjs/loader:1134:15) strapi-1 | at Module._load (node:internal/modules/cjs/loader:975:27) strapi-1 | at Module.require (node:internal/modules/cjs/loader:1225:19) strapi-1 | at require (node:internal/modules/helpers:177:18) strapi-1 | at Object. (/usr/local/share/.config/yarn/global/node_modules/@strapi/admin/dist/_chunks/index-sNH2VWbC.js:15:15) strapi-1 | at Module._compile (node:internal/modules/cjs/loader:1356:14) strapi-1 | at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) strapi-1 | at Module.load (node:internal/modules/cjs/loader:1197:32) strapi-1 | at Module._load (node:internal/modules/cjs/loader:1013:12) strapi-1 | at Module.require (node:internal/modules/cjs/loader:1225:19) { strapi-1 | code: 'MODULE_NOT_FOUND', strapi-1 | requireStack: [ strapi-1 | '/usr/local/share/.config/yarn/global/node_modules/@strapi/admin/dist/_chunks/index-sNH2VWbC.js', strapi-1 | '/usr/local/share/.config/yarn/global/node_modules/@strapi/admin/dist/cli.js', strapi-1 | '/usr/local/share/.config/yarn/global/node_modules/@strapi/admin/index.js', strapi-1 | '/usr/local/share/.config/yarn/global/node_modules/@strapi/strapi/dist/commands/actions/watch-admin/action.js', strapi-1 | '/usr/local/share/.config/yarn/global/node_modules/@strapi/strapi/dist/commands/actions/watch-admin/command.js', strapi-1 | '/usr/local/share/.config/yarn/global/node_modules/@strapi/strapi/dist/commands/index.js', strapi-1 | '/usr/local/share/.config/yarn/global/node_modules/@strapi/strapi/dist/cli.js', strapi-1 | '/usr/local/share/.config/yarn/global/node_modules/@strapi/strapi/bin/strapi.js' strapi-1 | ] strapi-1 | } strapi-1 | strapi-1 | Node.js v18.19.0 strapi-1 | Using strapi strapi-1 | No project found at /srv/app. Creating a new strapi project ... strapi-1 | node:internal/modules/cjs/loader:1137 strapi-1 | throw err; strapi-1 | ^ strapi-1 | strapi-1 | Error: Cannot find module 'react' strapi-1 | Require stack: strapi-1 | - /usr/local/share/.config/yarn/global/node_modules/@strapi/admin/dist/_chunks/index-sNH2VWbC.js strapi-1 | - /usr/local/share/.config/yarn/global/node_modules/@strapi/admin/dist/cli.js strapi-1 | - /usr/local/share/.config/yarn/global/node_modules/@strapi/admin/index.js strapi-1 | - /usr/local/share/.config/yarn/global/node_modules/@strapi/strapi/dist/commands/actions/watch-admin/action.js strapi-1 | - /usr/local/share/.config/yarn/global/node_modules/@strapi/strapi/dist/commands/actions/watch-admin/command.js strapi-1 | - /usr/local/share/.config/yarn/global/node_modules/@strapi/strapi/dist/commands/index.js strapi-1 | - /usr/local/share/.config/yarn/global/node_modules/@strapi/strapi/dist/cli.js strapi-1 | - /usr/local/share/.config/yarn/global/node_modules/@strapi/strapi/bin/strapi.js strapi-1 | at Module._resolveFilename (node:internal/modules/cjs/loader:1134:15) strapi-1 | at Module._load (node:internal/modules/cjs/loader:975:27) strapi-1 | at Module.require (node:internal/modules/cjs/loader:1225:19) strapi-1 | at require (node:internal/modules/helpers:177:18) strapi-1 | at Object. (/usr/local/share/.config/yarn/global/node_modules/@strapi/admin/dist/_chunks/index-sNH2VWbC.js:15:15) strapi-1 | at Module._compile (node:internal/modules/cjs/loader:1356:14) strapi-1 | at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) strapi-1 | at Module.load (node:internal/modules/cjs/loader:1197:32) strapi-1 | at Module._load (node:internal/modules/cjs/loader:1013:12) strapi-1 | at Module.require (node:internal/modules/cjs/loader:1225:19) { strapi-1 | code: 'MODULE_NOT_FOUND', strapi-1 | requireStack: [ strapi-1 | '/usr/local/share/.config/yarn/global/node_modules/@strapi/admin/dist/_chunks/index-sNH2VWbC.js', strapi-1 | '/usr/local/share/.config/yarn/global/node_modules/@strapi/admin/dist/cli.js', strapi-1 | '/usr/local/share/.config/yarn/global/node_modules/@strapi/admin/index.js', strapi-1 | '/usr/local/share/.config/yarn/global/node_modules/@strapi/strapi/dist/commands/actions/watch-admin/action.js', strapi-1 | '/usr/local/share/.config/yarn/global/node_modules/@strapi/strapi/dist/commands/actions/watch-admin/command.js', strapi-1 | '/usr/local/share/.config/yarn/global/node_modules/@strapi/strapi/dist/commands/index.js', strapi-1 | '/usr/local/share/.config/yarn/global/node_modules/@strapi/strapi/dist/cli.js', strapi-1 | '/usr/local/share/.config/yarn/global/node_modules/@strapi/strapi/bin/strapi.js' strapi-1 | ] strapi-1 | } strapi-1 | strapi-1 | Node.js v18.19.0 strapi-1 exited with code 1

huaweihulk commented 8 months ago

same error on docker image version 4.20.1,any way to fix it or which verison can work properly

manuelmanharta1 commented 8 months ago

I got 4.14.5 working, not sure if that is the last working version.

IDK how to fix it, I guess it is a node version issue, but honestly I could not spend too much time to analyze it.

karpa13st commented 8 months ago

it works via console, ie docker run --rm -it ... && yarn && yarn build && yarn develop but doesn't work via docker compose(

akarabach commented 7 months ago

the same error for me

JiriHudec commented 7 months ago

the same for me

V-Shadbolt commented 6 months ago

See https://github.com/naskio/docker-strapi/issues/23#issuecomment-2111174501