Issue with setting up local environment
See original GitHub issueDescribe the bug:
There are few issues with the local dev environment
await initDB()
fails silently without starting a server. If I replace the code with the snippet below, it works fine.
initDB()
.then(() => {
console.log("connected");
}).catch((err) => {
console.log(err);
});
yarn both
gives me the following error
$ yarn both
yarn run v1.22.5
$ concurrently "yarn dev" "yarn --cwd='./client' dev"
$ ts-node-dev --no-notify -P tsconfig.server.json ./server/app.ts
$ ts-node-dev --no-notify -P tsconfig.server.json ./server/app.ts
[0] ts-node-dev ver. 1.0.0-pre.63 (using ts-node ver. 8.10.2, typescript ver. 3.9.7)
[1] ts-node-dev ver. 1.0.0-pre.63 (using ts-node ver. 8.10.2, typescript ver. 3.9.7)
[1] in module
[0] in module
[1] After express
[0] After express
[0] DB initialized
[1] DB initialized
[0] built schema
[1] built schema
[0] Created server
[0] applied middleware
[0] prepared options.
[1] Created server
[1] applied middleware
[1] prepared options.
[0] Listening on http://localhost:5000/graphql
[1] Error: listen EADDRINUSE: address already in use :::5000
[1] at Server.setupListenHandle [as _listen2] (net.js:1317:16)
[1] at listenInCluster (net.js:1365:12)
[1] at Server.listen (net.js:1451:7)
[1] at Function.listen (D:\repos\chapter\node_modules\express\lib\application.js
:618:24)
[1] at D:\repos\chapter\server\app.ts:62:9
[1] at processTicksAndRejections (internal/process/task_queues.js:93:5)
[1] [ERROR] 19:53:59 Error: listen EADDRINUSE: address already in use :::5000
On the other hand, running both the servers in seperate terminals worked fine for me.
Tell us about your browser and operating system:
- Browser(s) name and version:
- Operating System: Windows 10 Home edition
- Node Version: 14.13.10
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
What are some problems in setting up local developer ... - Quora
The main issue is to have conformity in the setup between production and development systems, and thus between development systems.
Read more >How to set up a local development environment - Creative Bloq
A local environment will let you focus on code and the fun bits of building websites.
Read more >Don't be stuck at dev environment setup! | Rookie's Lab
This is my favorite problem to fix whenever I start on any new project. Worst case scenario is, there's no db migration history,...
Read more >Best Practices Setting up Your Local Development Environment
Setting up your local development environment can be done in many different ways. This post presents different methods and best practices ...
Read more >Local Development Environment Setup for Windows
In this hands-on lab, you will setup your local web development environment. It will include version control with Git, helper apps, package managers ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@allella The fix works for me on Node
14.13.0
. Thanks.@allella
I’ve put up a pull request to add @rahul1990gupta! 🎉