-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Since yesterday docker build not working. BaseKeystoneAdapter.postConnect #3397
Comments
im getting this error even in development. I updated my package.json and now the my package.json
when i edit the file to console log the array of issues @HitsiLent mentioned in his bug report I get:
|
im facing the same problem, how does one restart the service without hitting this error and still able to work on existing database, especially mongoose adapter? |
@u007 Roll back to a version of your app that worked before the error started occurring. I'm encountering the same error but haven't tracked down the cause yet. The best clue I've got is that the version of the |
Okay, I traced the issue down to the version of mongoose. Mongoose Here are the changes listed in the mongoose 5.10.0 changelog: https://github.com/Automattic/mongoose/blob/master/History.md#5100--2020-08-14 I don't know enough about keystone to guess which change caused the breakage. Either way, I'd recommend locking the adapter-mongoose dependency on mongoose to 5.9.11 in the meantime, until a long-term fix can be made. |
TEMP FIX Before new release, Dockerfiler add line after RUN yarn install RUN rm -rf /home/node/node_modules/@keystonejs/adapter-mongoose/node_modules/mongoose add "mongoose": "5.9.11" on package.json file |
Hey folks. Any update here? I just have the same issue on my local. |
Thanks to all who have reported this bug. We're investigating it this morning and will ship a fix today. |
Bug report
Describe the bug
when we try to production keystone on docker it pops
✖ Connecting to database
Error: Multiple errors in BaseKeystoneAdapter.postConnect():
at resolveAllKeys (/home/node/node_modules/@keystonejs/utils/dist/utils.cjs.prod.js:44:95)
at async executeDefaultServer (/home/node/node_modules/@keystonejs/keystone/bin/utils.js:114:3) {
errors: {
MongooseAdapter: Error: Multiple errors in BaseKeystoneAdapter.postConnect():
at MongooseAdapter.connect (/home/node/node_modules/@keystonejs/keystone/lib/adapters/index.js:34:23)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async pReflect (/home/node/node_modules/p-reflect/index.js:5:17)
at async Promise.all (index 0)
at async resolveAllKeys (/home/node/node_modules/@keystonejs/utils/dist/utils.cjs.prod.js:42:21)
at async executeDefaultServer (/home/node/node_modules/@keystonejs/keystone/bin/utils.js:114:3) {
errors: [Array]
}
}
}
error Command failed with exit code 1.
To Reproduce
docker build -t
Docker build run code below via Dockerfile
https://docs.docker.com/samples/library/node/
ARG NODE_VERSION=12.10.0
https://github.com/Yelp/dumb-init/releases
ARG DUMB_INIT_VERSION=1.2.2
Build container
FROM node:${NODE_VERSION}-alpine AS build
ARG DUMB_INIT_VERSION
WORKDIR /home/node
RUN apk add --no-cache build-base python2 yarn &&
wget -O dumb-init -q https://github.com/Yelp/dumb-init/releases/download/v${DUMB_INIT_VERSION}/dumb-init_${DUMB_INIT_VERSION}_amd64 &&
chmod +x dumb-init
ADD . /home/node
ENV CI false
ENV TZ America/New_York
RUN yarn install && yarn build && yarn cache clean
Runtime container
FROM node:${NODE_VERSION}-alpine
WORKDIR /home/node
COPY --from=build /home/node /home/node
EXPOSE 3000
CMD ["./dumb-init", "yarn", "start"]
Expected behaviour
Docker image build successful
docker run --env-file .env -p 3000:3000 should working
but got
Screenshots
If applicable, add screenshots to help explain your problem.
System information
Additional context
package.json
{
"name": "@keystonejs/demo-project-meetup",
"description": "An example KeystoneJS project showcasing a Meetup Site.",
"private": true,
"version": "5.0.0",
"author": "The KeystoneJS Development Team",
"license": "MIT",
"engines": {
"node": ">=8.4.0"
},
"scripts": {
"dev": "cross-env NODE_ENV=development DISABLE_LOGGING=true keystone dev ",
"build": "cross-env NODE_ENV=production keystone build",
"start": "cross-env NODE_ENV=production keystone start"
},
"dependencies": {
"@apollo/react-hoc": "^3.1.3",
"@apollo/react-hooks": "^3.1.3",
"@apollo/react-ssr": "^3.1.3",
"@babel/plugin-transform-flow-strip-types": "^7.10.4",
"@date-io/date-fns": "^2.4.0",
"@emotion/core": "^10.0.27",
"@keystonejs/adapter-mongoose": "^5.2.2",
"@keystonejs/app-admin-ui": "^5.9.2",
"@keystonejs/app-graphql": "^5.1.3",
"@keystonejs/app-next": "^5.1.1",
"@keystonejs/auth-password": "^5.1.2",
"@keystonejs/email": "^5.1.1",
"@keystonejs/fields": "^7.0.1",
"@keystonejs/fields-wysiwyg-tinymce": "^5.2.1",
"@keystonejs/file-adapters": "^6.0.0",
"@keystonejs/keystone": "^6.0.2",
"@keystonejs/session": "^5.1.1",
"@material-ui/core": "4.9.4",
"@material-ui/icons": "^4.9.1",
"@sendgrid/mail": "^7.1.1",
"apollo-boost": "^0.4.7",
"apollo-client": "^2.6.8",
"apollo-fetch": "^0.7.0",
"apollo-link": "^1.2.13",
"atob": "^2.0.3",
"axios": "^0.19.2",
"body-parser": "^1.18.2",
"btoa": "^1.1.2",
"client-oauth2": "^4.2.5",
"cookie-parser": "^1.4.5",
"cross-env": "^7.0.0",
"crypto-js": "^4.0.0",
"csrf": "^3.0.4",
"date-fns": "^1.30.1",
"dotenv": "^8.2.0",
"ejs": "^2.5.2",
"eslint-plugin-emotion": "^10.0.27",
"expect": "^1.20.2",
"express": "^4.17.1",
"express-basic-auth": "^1.2.0",
"express-session": "^1.14.2",
"facepaint": "^1.2.1",
"fs": "0.0.2",
"get-contrast": "^2.0.0",
"graphql-tag": "^2.10.1",
"https": "^1.0.0",
"intuit-oauth": "^2.0.2",
"isomorphic-unfetch": "^3.0.0",
"jquery": "^3.4.1",
"jsforce": "^1.9.3",
"jsonwebtoken": "^7.1.9",
"lodash": "^4.17.15",
"lodash.uniqby": "^4.7.0",
"material-table": "1.57.2",
"moment": "^2.24.0",
"namor": "^2.0.2",
"net": "^1.0.2",
"next": "^9.2.0",
"node-quickbooks": "^2.0.33",
"papaparse": "^5.2.0",
"path": "^0.12.7",
"prop-types": "^15.7.2",
"react": "^16.13.0",
"react-apollo": "2.4.0",
"react-apollo-hooks": "^0.4.4",
"react-cookie": "^4.0.3",
"react-dom": "^16.13.0",
"react-table": "^7.0.0-rc.16",
"react-toast-notifications": "^2.3.0",
"react-use-form-state": "^0.12.0",
"request": "^2.78.0",
"rsa-pem-from-mod-exp": "^0.8.4",
"tls": "^0.0.1",
"twilio": "^3.48.1",
"universal-cookie": "^4.0.3",
"uuid": "^3.3.2"
}
}
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: