keystone-5 icon indicating copy to clipboard operation
keystone-5 copied to clipboard

can't get /admin in production - admin-ui-app

Open asheghi opened this issue 4 years ago • 6 comments

Bug report

In development mode, everything is fine, but after signing in in production, i receive the "cannot get /admin" error message from express.

Cookies and sessions work as well.

from the source code i guess that the build script is supposed to compile the admin-ui client in the /dist/admin/secure directory, but after successful build, only /dist/admin/public directory is created.

Screenshots

Screenshot from 2021-02-23 21-24-43

System information

  • OS: Ubuntu 20.04
  • Node Version: 12.20.2
  • keystonejs/app-admin-ui : 7.4.1
  • keystonejs/keystone : 19.2.0

and my build script is: "build": "cross-env NODE_ENV=production babel-node ./node_modules/.bin/keystone build"

asheghi avatar Feb 23 '21 17:02 asheghi

Same issue after upgrade from @keystonejs/keystone 17.1.0 to @keystonejs/keystone 19.2.0

keviiin38 avatar Feb 25 '21 09:02 keviiin38

I have the same issue with the @keystonejs/keystone 19.3.0

mkleins avatar Feb 25 '21 13:02 mkleins

Same issue with "17.1.2", maybe it is related to the react-day-picker? (saw an error that mentioned it)

Yair-Ohana avatar Feb 25 '21 15:02 Yair-Ohana

updated keystone packages to the latest version and problem is fixed now.

    "@keystonejs/adapter-mongoose": "^11.2.0",
    "@keystonejs/app-admin-ui": "^7.5.0",
    "@keystonejs/app-graphql": "^6.3.0",
    "@keystonejs/auth-password": "^6.1.0",
    "@keystonejs/fields": "^22.1.0",
    "@keystonejs/fields-wysiwyg-tinymce": "^5.4.0",
    "@keystonejs/file-adapters": "^7.1.0",
    "@keystonejs/keystone": "^19.3.0",
    "@keystonejs/list-plugins": "^8.1.0",
    "@keystonejs/server-side-graphql-client": "^2.1.0",

but react-day-picker style issue is not fixed yet.

asheghi avatar Feb 27 '21 19:02 asheghi

My build on gitlab failed, and this was the cause. @keystone/fields has upgraded react-day-picker to beta which has an engine requirement of node 14. I suggest reverting that because it's a breaking change.

savager avatar Feb 28 '21 01:02 savager

By the way, for a quick fix, since I had to have this working tonight I just modified my dockerfile to do

yarn install --ignore-engines

to avoid the error. I wasn't ready to update every keystone dependency.

savager avatar Feb 28 '21 01:02 savager