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
Unable to install on Windows 10 #53
Comments
@MikePugs try setting |
No luck. My Steps:
$ docker-compose up |
I see "Node.js API server is listening on ..." it means that the app is running, you should be able to access it via http://localhost:8080/.. Regarding "database dev does not exist", one way is to remove the volumes created during the initial run of |
@MikePugs this script is executed during the initial run of |
Here are the environment variables returned by the command you provided:
It seems that I am only able to remove a volume after I remove the associated container. Otherwise, I receive the following error:
After I remove all of the containers and all of the volumes I still receive No Containers:
No Volumes:
docker-compose up
|
I see, it complains about the git remote add nodejs-api-starter https://github.com/kriasoft/nodejs-api-starter.git
git checkout master
git fetch nodejs-api-starter
git merge nodejs-api-starter/master |
I'm not sure I did the git update correctly, or if I continued to experience issues because it wasn't just the last I solved that particular
which I believe replaces all of the After I ran that command, removed all containers and volumes the
The next step of seeding the database understandably throws errors as a result:
Related*: https://stackoverflow.com/questions/11616835/r-command-not-found-bashrc-bash-profile |
I went to my home computer, deleted the repository, containers, volumes and started over. It seems to have worked now. Further research suggests that the "fast shutdown" described above is normal behavior. Here is the output which resulted in what seems to be a successful install on my windows 10 machine $ docker-compose up Thanks for the help. |
Great to hear your issue is now resolved! @MikePugs 👍 I thought I would find the same issue in this thread but it seems not so, my issue is slightly different please let me know if I should open a new issue. I followed the steps in this article: I also ran But when I ran api_1 | yarn install v1.1.0 I'd really appreciate any help :( This is a fantastic project! |
@psyanite the error says that there are missing NPM modules (e.g.
|
Thank's @koistya! I'll give it a try and open another issue or something if needed, but I think it's a windows bug that there are some permission issues. Cheers 🍰 |
I just removed Docker dependency, it should work fine on Windows, all you need is just Node.js 10+ runtime, Yarn and a local or remote instance of PostgreSQL server. |
I've tried to get this running using the default development configuration on 3 different windows 10 machines without success.
Here are the steps I am taking:
Try to seed databases in spite of error from above step.
winpty docker-compose exec api yarn db-seed
Notice more errors. Try the process again by executing docker-compose down followed by docker-compose up
Below is the output from steps 2-4.
$ docker-compose up
Creating network "exampleapi_default" with the default driver
Creating volume "exampleapi_redis" with default driver
Creating volume "exampleapi_db" with default driver
Creating volume "exampleapi_yarn" with default driver
Pulling redis (redis:4.0.1-alpine)...
4.0.1-alpine: Pulling from library/redis
Digest: sha256:e633cded055a94202e4ccccb8125b7f383cd6ee56527ab890db643383a2647dd
Status: Downloaded newer image for redis:4.0.1-alpine
Pulling db (postgres:9.6.4-alpine)...
9.6.4-alpine: Pulling from library/postgres
Digest: sha256:5fd73de311d304caeb4f907d4f559d322805abc622e4baf5788c6a079ee5224e
Status: Downloaded newer image for postgres:9.6.4-alpine
Pulling api (node:8.3.0-alpine)...
8.3.0-alpine: Pulling from library/node
Digest: sha256:811180c902c56e594832bc553bfc5ba8315959a55d453e045bfe77af9b2341cb
Status: Downloaded newer image for node:8.3.0-alpine
Pulling nginx (nginx:1.13.3-alpine)...
1.13.3-alpine: Pulling from library/nginx
Digest: sha256:24a27241f0450b465f9e9deb30628c524aa81a1aa6936daa41ef7c4345515272
Status: Downloaded newer image for nginx:1.13.3-alpine
Creating exampleapi_redis_1 ...
Creating exampleapi_db_1 ...
Creating exampleapi_db_1
Creating exampleapi_db_1 ... done
Creating exampleapi_api_1 ...
Creating exampleapi_api_1 ... done
Creating exampleapi_nginx_1 ...
Creating exampleapi_nginx_1 ... done
Attaching to exampleapi_redis_1, exampleapi_db_1, exampleapi_api_1, exampleapi_n ginx_1
redis_1 | 1:C 16 Aug 15:41:22.078 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0 Oo
redis_1 | 1:C 16 Aug 15:41:22.079 # Redis version=4.0.1, bits=64, commit=000000 00, modified=0, pid=1, just started
db_1 | The files belonging to this database system will be owned by user "po stgres".
redis_1 | 1:C 16 Aug 15:41:22.079 # Warning: no config file specified, using th e default config. In order to specify a config file use redis-server /path/to/re dis.conf
db_1 | This user must also own the server process.
api_1 | yarn install v0.27.5
db_1 |
redis_1 | 1:M 16 Aug 15:41:22.080 * Running mode=standalone, port=6379.
db_1 | The database cluster will be initialized with locale "en_US.utf8".
api_1 | [1/4] Resolving packages...
redis_1 | 1:M 16 Aug 15:41:22.080 # WARNING: The TCP backlog setting of 511 can not be enforced because /proc/sys/net/core/somaxconn is set to the lower value o f 128.
db_1 | The default database encoding has accordingly been set to "UTF8".
redis_1 | 1:M 16 Aug 15:41:22.080 # Server initialized
api_1 | [2/4] Fetching packages...
db_1 | The default text search configuration will be set to "english".
redis_1 | 1:M 16 Aug 15:41:22.080 # WARNING you have Transparent Huge Pages (TH P) support enabled in your kernel. This will create latency and memory usage iss ues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/t ransparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disab led.
db_1 |
redis_1 | 1:M 16 Aug 15:41:22.080 * Ready to accept connections
db_1 | Data page checksums are disabled.
db_1 |
db_1 | fixing permissions on existing directory /var/lib/postgresql/data ... ok
db_1 | creating subdirectories ... ok
db_1 | selecting default max_connections ... 100
db_1 | selecting default shared_buffers ... 128MB
db_1 | selecting dynamic shared memory implementation ... posix
db_1 | creating configuration files ... ok
db_1 | running bootstrap script ... ok
db_1 | performing post-bootstrap initialization ... No usable system locales were found.
db_1 | Use the option "--debug" to see details.
db_1 | sh: locale: not found
db_1 | ok
db_1 | syncing data to disk ...
db_1 | WARNING: enabling "trust" authentication for local connections
db_1 | You can change this by editing pg_hba.conf or using the option -A, or
db_1 | --auth-local and --auth-host, the next time you run initdb.
db_1 | ok
db_1 |
db_1 | Success. You can now start the database server using:
db_1 |
db_1 | pg_ctl -D /var/lib/postgresql/data -l logfile start
db_1 |
db_1 | ****************************************************
db_1 | WARNING: No password has been set for the database.
db_1 | This will allow anyone with access to the
db_1 | Postgres port to access your database. In
db_1 | Docker's default configuration, this is
db_1 | effectively any other container on the same
db_1 | system.
db_1 |
db_1 | Use "-e POSTGRES_PASSWORD=password" to set
db_1 | it in "docker run".
db_1 | ****************************************************
db_1 | waiting for server to start....LOG: could not bind IPv6 socket: Addr ess not available
db_1 | HINT: Is another postmaster already running on port 5432? If not, wa it a few seconds and retry.
db_1 | LOG: database system was shut down at 2017-08-16 15:42:02 UTC
db_1 | LOG: MultiXact member wraparound protections are now enabled
db_1 | LOG: database system is ready to accept connections
db_1 | LOG: autovacuum launcher started
db_1 | done
db_1 | server started
db_1 | ALTER ROLE
db_1 |
db_1 |
db_1 | /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initd b.d/initdb.sh
db_1 | /docker-entrypoint-initdb.d/initdb.sh: line 2: $'\r': command not fou nd
exampleapi_db_1 exited with code 127
api_1 | warning fsevents@1.1.2: The platform "linux" is incompatible with thi s module.
api_1 | info "fsevents@1.1.2" is an optional dependency and failed compatibil ity check. Excluding it from installation.
api_1 | [3/4] Linking dependencies...
api_1 | [4/4] Building fresh packages...
api_1 | Done in 55.49s.
api_1 | Starting 'run'...
api_1 | Starting 'db-migrate'...
api_1 | Error: getaddrinfo EAI_AGAIN db:5432
api_1 | at Object._errnoException (util.js:1022:11)
api_1 | at errnoException (dns.js:58:15)
api_1 | at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:95:26)
api_1 | Starting 'build'...
api_1 | src/DataLoaders.js -> build/DataLoaders.js
api_1 | src/app.js -> build/app.js
api_1 | src/db.js -> build/db.js
api_1 | src/email.js -> build/email.js
api_1 | src/passport.js -> build/passport.js
api_1 | src/redis.js -> build/redis.js
api_1 | src/server.js -> build/server.js
api_1 | src/routes/account.js -> build/routes/account.js
api_1 | src/schema/Comment.js -> build/schema/Comment.js
api_1 | src/schema/CommentType.js -> build/schema/CommentType.js
api_1 | src/schema/EmailType.js -> build/schema/EmailType.js
api_1 | src/schema/Node.js -> build/schema/Node.js
api_1 | src/schema/README.md -> build/schema/README.md
api_1 | src/schema/Story.js -> build/schema/Story.js
api_1 | src/schema/StoryType.js -> build/schema/StoryType.js
api_1 | src/schema/User.js -> build/schema/User.js
api_1 | src/schema/UserType.js -> build/schema/UserType.js
api_1 | src/schema/ValidationError.js -> build/schema/ValidationError.js
api_1 | src/schema/index.js -> build/schema/index.js
api_1 | src/emails/welcome/html.hbs -> build/emails/welcome/html.js
api_1 | src/emails/welcome/subject.hbs -> build/emails/welcome/subject.js
api_1 | Finished 'build' after 1010ms
api_1 | Node.js API server is listening on http://api:8080/
$ winpty docker-compose exec api yarn db-seed
yarn db-seed v0.27.5
$ node tools/db.js seed
Starting 'db-seed'...
Error: getaddrinfo EAI_AGAIN db:5432
at Object._errnoException (util.js:1022:11)
at errnoException (dns.js:58:15)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:95:26)
Done in 26.30s.
$ docker-compose down
Stopping exampleapi_nginx_1 ...
Stopping exampleapi_nginx_1 ... done
Stopping exampleapi_api_1 ... done
exampleapi_nginx_1 exited with code 0
exampleapi_api_1 exited with code 0
redis_1 | 1:signal-handler (1502898486) Received SIGTERM scheduling shutdown...
redis_1 | 1:M 16 Aug 15:48:07.046 # User requested shutdown...
redis_1 | 1:M 16 Aug 15:48:07.046 * Saving the final RDB snapshot before exiting.
redis_1 | 1:M 16 Aug 15:48:07.074 * DB saved on disk
Stopping exampleapi_redis_1 ... done
exampleapi_redis_1 exited with code 0
Removing exampleapi_nginx_1 ... done
Removing exampleapi_api_1 ... done
Removing exampleapi_db_1 ... done
Removing exampleapi_redis_1 ... done
Removing network exampleapi_default
$ docker-compose up
Creating network "exampleapi_default" with the default driver
Creating exampleapi_redis_1 ...
Creating exampleapi_db_1 ...
Creating exampleapi_db_1
Creating exampleapi_redis_1 ... done
Creating exampleapi_api_1 ...
Creating exampleapi_api_1 ... done
Creating exampleapi_nginx_1 ...
Creating exampleapi_nginx_1 ... done
Attaching to exampleapi_db_1, exampleapi_redis_1, exampleapi_api_1, exampleapi_nginx_1
db_1 | LOG: database system was interrupted; last known up at 2017-08-16 15:42:07 UTC
db_1 | LOG: database system was not properly shut down; automatic recovery in progress
db_1 | LOG: redo starts at 0/14EDC10
redis_1 | 1:C 16 Aug 15:48:31.164 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
db_1 | LOG: invalid record length at 0/14EDDF0: wanted 24, got 0
redis_1 | 1:C 16 Aug 15:48:31.164 # Redis version=4.0.1, bits=64, commit=00000000, modified=0, pid=1, just started
db_1 | LOG: redo done at 0/14EDDC8
redis_1 | 1:C 16 Aug 15:48:31.164 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
db_1 | LOG: last completed transaction was at log time 2017-08-16 15:42:07.984983+00
redis_1 | 1:M 16 Aug 15:48:31.166 * Running mode=standalone, port=6379.
db_1 | LOG: MultiXact member wraparound protections are now enabled
redis_1 | 1:M 16 Aug 15:48:31.166 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
db_1 | LOG: database system is ready to accept connections
redis_1 | 1:M 16 Aug 15:48:31.166 # Server initialized
redis_1 | 1:M 16 Aug 15:48:31.166 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
db_1 | LOG: autovacuum launcher started
redis_1 | 1:M 16 Aug 15:48:31.166 * DB loaded from disk: 0.000 seconds
redis_1 | 1:M 16 Aug 15:48:31.166 * Ready to accept connections
api_1 | Starting 'run'...
api_1 | Starting 'db-migrate'...
db_1 | FATAL: database "dev" does not exist
db_1 | FATAL: database "dev" does not exist
db_1 | FATAL: database "dev" does not exist
api_1 | error: database "dev" does not exist
api_1 | at Connection.parseE (/usr/src/app/node_modules/pg/lib/connection.js:546:11)
api_1 | at Connection.parseMessage (/usr/src/app/node_modules/pg/lib/connection.js:371:19)
api_1 | at Socket. (/usr/src/app/node_modules/pg/lib/connection.js:114:22)
api_1 | at emitOne (events.js:115:13)
api_1 | at Socket.emit (events.js:210:7)
api_1 | at addChunk (_stream_readable.js:252:12)
api_1 | at readableAddChunk (_stream_readable.js:239:11)
api_1 | at Socket.Readable.push (_stream_readable.js:197:10)
api_1 | at TCP.onread (net.js:589:20)
api_1 | Starting 'build'...
api_1 | src/DataLoaders.js -> build/DataLoaders.js
api_1 | src/app.js -> build/app.js
api_1 | src/db.js -> build/db.js
api_1 | src/email.js -> build/email.js
api_1 | src/passport.js -> build/passport.js
api_1 | src/redis.js -> build/redis.js
api_1 | src/server.js -> build/server.js
api_1 | src/routes/account.js -> build/routes/account.js
api_1 | src/schema/Comment.js -> build/schema/Comment.js
api_1 | src/schema/CommentType.js -> build/schema/CommentType.js
api_1 | src/schema/EmailType.js -> build/schema/EmailType.js
api_1 | src/schema/Node.js -> build/schema/Node.js
api_1 | src/schema/README.md -> build/schema/README.md
api_1 | src/schema/Story.js -> build/schema/Story.js
api_1 | src/schema/StoryType.js -> build/schema/StoryType.js
api_1 | src/schema/User.js -> build/schema/User.js
api_1 | src/schema/UserType.js -> build/schema/UserType.js
api_1 | src/schema/ValidationError.js -> build/schema/ValidationError.js
api_1 | src/schema/index.js -> build/schema/index.js
api_1 | src/emails/welcome/html.hbs -> build/emails/welcome/html.js
api_1 | src/emails/welcome/subject.hbs -> build/emails/welcome/subject.js
api_1 | Finished 'build' after 1146ms
api_1 | Node.js API server is listening on http://api:8080/
db_1 | FATAL: database "dev" does not exist
db_1 | FATAL: database "dev" does not exist
The text was updated successfully, but these errors were encountered: