keystonejs / keystone-5

https://v5.keystonejs.com
MIT License
65 stars 34 forks source link

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

Open asheghi opened 3 years ago

asheghi commented 3 years ago

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

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

keviiin38 commented 3 years ago

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

mkleins commented 3 years ago

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

Yair-Ohana commented 3 years ago

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

asheghi commented 3 years ago

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.

savager commented 3 years ago

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 commented 3 years ago

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.