expressGraphQL is not a function

Please replace your expressGraphQL with graphqlHTTP as it was destructured Use: const { graphqlHTTP } = require(‘express-graphql’); or const expressGraphQL = require(‘express-graphql’).graphqlHTTP This is because a method called graphqlHTTP exist in the express-graphql module and you are destructure with another method name that does not exist in the module I also noticed that you have … Read more

Webpack –watch and launching nodemon?

Install the following dependencies: npm install npm-run-all webpack nodemon Configure your package.json file to something as seen below: package.json { … “scripts”: { “start” : “npm-run-all –parallel watch:server watch:build”, “watch:build” : “webpack –watch”, “watch:server” : “nodemon \”./dist/index.js\” –watch \”./dist\”” }, … } After doing so, you can easily run your project by using npm start. … Read more

How to debug a nodemon project in VSCode

Change package.json to “scripts”: { “dev”: “node app.js”, “debug”: “nodemon –inspect app.js” } –inspect is for versions >= 6.3. –legacy or –auto for older versions And launch.json to: “version”: “0.2.0”, “configurations”: [ { “type”: “node”, “request”: “attach”, “name”: “Node: Nodemon”, “processId”: “${command:PickProcess}”, “restart”: true, “protocol”: “inspector” } ] the restart flag is the key here. … Read more

Can Visual Studio Code be configured to launch with nodemon

First, install nodemon as a dev dependency: npm install –save-dev nodemon For newer versions of VS Code set up your .vscode/launch.json file like this: { “version”: “0.2.0”, “configurations”: [ { “type”: “node”, “request”: “launch”, “name”: “nodemon”, “runtimeExecutable”: “${workspaceFolder}/node_modules/nodemon/bin/nodemon.js”, “program”: “${workspaceFolder}/app.js”, “restart”: true, “console”: “integratedTerminal”, “internalConsoleOptions”: “neverOpen” }] } The most important pieces are the runtimeExecutable … Read more

nodemon ignore directory

You need to replace .. with ., or just reference client/ directly, also you will need to remove the asterisk: “devStart”: “nodemon –ignore ./client/ –exec babel-node src/server.js” Or “devStart”: “nodemon –ignore client/ –exec babel-node src/server.js” According to nodemon docs this is how to ignore a directory via command line: nodemon –ignore lib/ –ignore tests/ Also … Read more

Warning: Accessing non-existent property ‘MongoError’ of module exports inside circular dependency

Just found this, warning can be ignored it will be fixed in the coming updates Hi All, Thanks for reporting! I hit the issue myself today while I was working. I checked in with the Node driver team. The warning is safe to ignore and will hopefully be gone in an upcoming release. https://developer.mongodb.com/community/forums/t/warning-accessing-non-existent-property-mongoerror-of-module-exports-inside-circular-dependency/15411/6

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)