compatibility error with create Strapi app with MongoDB - mongodb

npm --v:
7.5.6
node -v
v15.9.0
npx create-strapi-app .
i am trying to create strapi app with MongoDB Atlas, but i get this error with i dont understand..
Connection test failed: Command failed: yarnpkg --cwd C:\Users\x\AppData\Local\Temp\strapic1eac7442b18 add strapi-connector-mongoose#3.5.3
error strapi-connector-mongoose#3.5.3:
The engine "node" is incompatible with this module.
Expected version >=10.16.0 <=14.x.x. Got 15.9.0
error Found incompatible module.
so: Expected version >=10.16.0 <=14.x.x. ??? of what? my node version?
is this is mean strapi is far behind with node?
how to solve this?

of what? my node version?
yes
is this is mean strapi is far behind with node? how to solve this?
use node with vesion between 10.16.0 and 14.x.x

Related

unsupported frontend protocol 1234.5680: server supports 2.0 to 3.0

I am running confluence 7.9.1 and postgres 10 but when we start only postgres container it doesn't throw below logs
unsupported frontend protocol 1234.5680: server supports 2.0 to 3.0
but when we start confluence with version 7.9.1 , postgres container will throw above logs.
Anyone know how we can resolve this since we tried PGGSSENCMODE=disable in env but it didnt help.
Regards,
Samurai
We resolved this by using new postgresql-42.2.18.jar which we replaced with postgresql-42.2.16.jar
suggested here : https://jira.atlassian.com/browse/CONFSERVER-60515?error=login_required&error_description=Login+required&state=14f30dda-a08b-4f9d-9841-ed77c8e91c79
Thank you for your support.
For those who are using postgresql-42.2.16.jar or prior and are looking to quiet this error without upgrading the JDBC jar, you can use the following option in the connection string - note case sensitivity:
gssEncMode=disable

GraphQL error when launching KeystoneJS application

I just created a KeystoneJS using yarn create keystone-app my-app.
When I try to run it using yarn dev and browse to it I get the following error:
Error: Cannot use GraphQLSchema "[object GraphQLSchema]" from another module or realm.
Ensure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version is installed.
https://yarnpkg.com/en/docs/selective-version-resolutions
Duplicate "graphql" modules cannot be used at the same time since different
versions may have different capabilities and behavior. The data from one
version used in the function from another could produce confusing and
spurious results.
at instanceOf (/my/home/path/my-first-ks-app/node_modules/#keystonejs/keystone/node_modules/graphql/jsutils/instanceOf.js:28:13)
at isSchema (/my/home/path/my-first-ks-app/node_modules/#keystonejs/keystone/node_modules/graphql/type/schema.js:36:34)
at assertSchema (/my/home/path/my-first-ks-app/node_modules/#keystonejs/keystone/node_modules/graphql/type/schema.js:40:8)
at validateSchema (/my/home/path/my-first-ks-app/node_modules/#keystonejs/keystone/node_modules/graphql/type/validate.js:44:28)
at graphqlImpl (/my/home/path/my-first-ks-app/node_modules/#keystonejs/keystone/node_modules/graphql/graphql.js:79:62)
at /my/home/path/my-first-ks-app/node_modules/#keystonejs/keystone/node_modules/graphql/graphql.js:28:59
at new Promise (<anonymous>)
at graphql (/my/home/path/my-first-ks-app/node_modules/#keystonejs/keystone/node_modules/graphql/graphql.js:26:10)
at _graphQLQuery.<computed> (/my/home/path/my-first-ks-app/node_modules/#keystonejs/keystone/lib/Keystone/index.js:477:7)
at Keystone.executeQuery (/my/home/path/my-first-ks-app/node_modules/#keystonejs/keystone/lib/Keystone/index.js:252:14)
at Object.module.exports [as onConnect] (/my/home/path/my-first-ks-app/initial-data.js:10:22)
at /my/home/path/my-first-ks-app/node_modules/#keystonejs/keystone/lib/Keystone/index.js:323:35
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async executeDefaultServer (/my/home/path/my-first-ks-app/node_modules/#keystonejs/keystone/bin/utils.js:114:3)
error Command failed with exit code 1.
I am on Windows 10 / WSL (v1) with Ubuntu. KeystoneJS is running from Linux and MongoDB server is installed and running on Windows. This is because when I had it running in Linux, mongod showed as running and listening but I was not able to connect to it (via KeystoneJS or via shell using mongo command).
How do I fix this issue?
I was using graphql#15.0.0 when I got this error.
I fixed it by downgrading to graphql#14.6.0.
I got this issue on a keystone project with apollo.
run this line
rm -rf node_modules/#keystonejs/keystone/node_modules/graphql
or add it to the Dockerfile for building image for production

What causes error "Connection test failed: spawn npm; ENOENT" when creating new Strapi project with MongoDB?

I am trying to create a new Strapi app on Ubuntu 16.4 using MongoDB. After stepping through the tutorial, here: https://strapi.io/documentation/3.0.0-beta.x/guides/databases.html#mongodb-installation, I get the following error: Connection test failed: spawn npm; ENOENT
The error seems obvious, but I'm having issues getting to the cause of it. I've installed latest version of MongoDB and have ensured it is running using service mongod status. I can also connect directly using nc, like below.
$ nc -zvv localhost 27017
Connection to localhost 27017 port [tcp/*] succeeded!
Here is an image of the terminal output:
Any help troubleshooting this would be appreciated! Does Strapi perhaps log setup errors somewhere, or is there a way to get verbose logging? Is it possible the connection error would be logged by MongoDB somewhere?
I was able to find the answer. The problem was with using npx instead of Yarn. Strapi documentation states that either should work, however, it is clear from my experience that there is a bug when using npx.
I switched to Yarn and the process proceeded as expected without error. Steps were otherwise exactly the same.
Update: There is also a typo in Strapi documentation for yarn. They include the word "new" before the project name, which will create a project called new and ignore the project name.
Strapi docs (incorrect):
yarn create strapi-app new my-project
Correct usage, based on my experience:
yarn create strapi-app my-project
The ENOENT error is "an abbreviation of Error NO ENTry (or Error NO ENTity), and can actually be used for more than files/directories."
Why does ENOENT mean "No such file or directory"?
Everything I've read on this points toward issues with environment variables and the process.env.PATH.
"NOTE: This error is almost always caused because the command does not exist, because the working directory does not exist, or from a windows-only bug."
How do I debug "Error: spawn ENOENT" on node.js?
If you take the function that Jiaji Zhou provides in the link above and paste it into the top of your config/functions/bootstrap.js file (above module.exports), it might give you a better idea of where the error is occurring, specifically it should tell you the command it ran. Then run the command > which nameOfCommand to see what file path it returns.
"miss-installed programs are the most common cause for a not found command. Refer to each command documentation if needed and install it." - laconbass (from the same link, below Jiaji Zhou's answer)
This is how I interpret all of the above and form a solution. Put that function in bootstrap.js, then take the command returned from the function and run > which nameOfCommand. Then in bootstrap.js (you can comment out the function), put console.log(process.env.PATH) which will return a string of all the directories your current environment is checking for executables. If the path returned from your which command isn't in your process.env.PATH, you can move the command into a path, or try re-installing.

MongoError exception: FieldPath field names may not start with '$'

We just migrated our infrastructure on AWS from one account to another.
The mongo version installed on the server is 2.4.9
I am new to MongoDb and faced the following 2 errors when I ran the web app -
{"name":"MongoError","errmsg":"exception: FieldPath field names may not start with '$'.","code":16410,"ok":0}
and
{"name":"MongoError","errmsg":"exception: the $cond operator requires an array of 3 operands","code":16019,"ok":0}
The web app was working on our previous instances. Can anyone point me in the right direction?
Upgrading to the latest mongodb (3.0.2) helped resolve this issue for me.
P.S. - Make sure you kill the mongod process already running using killall -15 instead of pkill -9 as the latter could cause damage.

Getting error while creating node in postgres-xc cluster database

I have tried to create postgres-xc cluster database.So i followed their documentation do that (http://postgres-xc.sourceforge.net/docs/1_1/install-short.html)
After following that documentation procedure I'm not able to create node. I'm getting the following error:
ERROR: syntax error at or near "NODE"
when running following command
/usr/local/pgsql/bin/psql -c "CREATE NODE datanode1 WITH (TYPE = 'datanode', PORT = 15432)" postgres
Can anyone help me to do solve this.
I suspect a_horse_with_no_name is right. postgres-xc and postgresql are different codebases and you can't run CREATE NODE on PostgreSQL and have it work. You must be running Postgres-XC.
To find out, run SELECT version() from psql.
To install Postgres-XC the first step is to actually install the Postgres-XC software either from packages or from source (by compiling).