Skip to content
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

Error: Cannot find module 'dotenv' #1

Open
agrrr3 opened this issue Jan 25, 2017 · 2 comments
Open

Error: Cannot find module 'dotenv' #1

agrrr3 opened this issue Jan 25, 2017 · 2 comments

Comments

@agrrr3
Copy link

agrrr3 commented Jan 25, 2017

Hi,

ich bin beim grünen Markt und wollte mir grad euren happy-hours service mal ausprobieren.
Mir ist schon klar dass ich wahrscheinlich noch irgendwelche accounts o.ä. konfigurieren/aufsetzen müsste, aber kenn mich auf die schnelle nicht so aus. Also einfach mal ... docker-compose up

Die Fehlermeldung habe jedenfalls nicht erwartet (ein leeres .env in config anlegen hat nichts geändert):

redis_1 | 1:C 25 Jan 13:06:46.468 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis_1 | .
redis_1 | .-__ ''-._ redis_1 | _.- . . ''-._ Redis 3.2.6 (00000000/0) 64 bit
redis_1 | .- .-```. ```\/ _.,_ ''-._ redis_1 | ( ' , .-` | `, ) Running in standalone mode redis_1 | |`-._`-...-` __...-.-.|'_.-'| Port: 6379 redis_1 | | -. ._ / _.-' | PID: 1 redis_1 | -._ -._ -./ .-' .-'
redis_1 | |-._-.
-.__.-' _.-'_.-'| redis_1 | | -.
-._ _.-'_.-' | http://redis.io redis_1 | -._ -._-..-'.-' .-'
redis_1 | |-._-.
-.__.-' _.-'_.-'| redis_1 | | -.
-._ _.-'_.-' | redis_1 | -._ -._-.
.-'_.-' _.-'
redis_1 | -._ -..-' _.-'
redis_1 | -._ _.-' redis_1 | -.
.-'
redis_1 |
redis_1 | 1:M 25 Jan 13:06:46.473 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
redis_1 | 1:M 25 Jan 13:06:46.473 # Server started, Redis version 3.2.6
redis_1 | 1:M 25 Jan 13:06:46.473 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis_1 | 1:M 25 Jan 13:06:46.473 # 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.
redis_1 | 1:M 25 Jan 13:06:46.473 * DB loaded from disk: 0.000 seconds
redis_1 | 1:M 25 Jan 13:06:46.473 * The server is now ready to accept connections on port 6379
proxy_1 | Activating privacy features... done.
proxy_1 | http://localhost:3000
happy-hours_1 |
happy-hours_1 | > [email protected] start /usr/src/app
happy-hours_1 | > node ./bin/www
happy-hours_1 |
happy-hours_1 | module.js:472
happy-hours_1 | throw err;
happy-hours_1 | ^
happy-hours_1 |
happy-hours_1 | Error: Cannot find module 'dotenv'
happy-hours_1 | at Function.Module._resolveFilename (module.js:470:15)
happy-hours_1 | at Function.Module._load (module.js:418:25)
happy-hours_1 | at Module.require (module.js:498:17)
happy-hours_1 | at require (internal/module.js:20:19)
happy-hours_1 | at Object. (/usr/src/app/bin/www:6:1)
happy-hours_1 | at Module._compile (module.js:571:32)
happy-hours_1 | at Object.Module._extensions..js (module.js:580:10)
happy-hours_1 | at Module.load (module.js:488:32)
happy-hours_1 | at tryModuleLoad (module.js:447:12)
happy-hours_1 | at Function.Module._load (module.js:439:3)
happy-hours_1 |
happy-hours_1 | npm ERR! Linux 3.13.0-107-generic
happy-hours_1 | npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start"
happy-hours_1 | npm ERR! node v7.4.0
happy-hours_1 | npm ERR! npm v4.0.5
happy-hours_1 | npm ERR! code ELIFECYCLE
happy-hours_1 | npm ERR! [email protected] start: node ./bin/www
happy-hours_1 | npm ERR! Exit status 1
happy-hours_1 | npm ERR!
happy-hours_1 | npm ERR! Failed at the [email protected] start script 'node ./bin/www'.
happy-hours_1 | npm ERR! Make sure you have the latest version of node.js and npm installed.
happy-hours_1 | npm ERR! If you do, this is most likely a problem with the happy-hours package,
happy-hours_1 | npm ERR! not with npm itself.
happy-hours_1 | npm ERR! Tell the author that this fails on your system:
happy-hours_1 | npm ERR! node ./bin/www
happy-hours_1 | npm ERR! You can get information on how to open an issue for this project with:
happy-hours_1 | npm ERR! npm bugs happy-hours
happy-hours_1 | npm ERR! Or if that isn't available, you can get their info via:
happy-hours_1 | npm ERR! npm owner ls happy-hours
happy-hours_1 | npm ERR! There is likely additional logging output above.
happy-hours_1 | npm WARN Local package.json exists, but node_modules missing, did you mean to install?
happy-hours_1 |
happy-hours_1 | npm ERR! Please include the following file with any support request:
happy-hours_1 | npm ERR! /usr/src/app/npm-debug.log
happyhours_happy-hours_1 exited with code 1

@agrrr3
Copy link
Author

agrrr3 commented Feb 4, 2017

Also das dotenv modul ist an sich dort (version 2.0.0). Auch ein npm install -g hat nicht geholfen.

@agrrr3
Copy link
Author

agrrr3 commented Feb 5, 2017

Der hat die .env datei die ich in config/ angelegt hatte nicht mitkopiert ins image, da es in .dockerignore ausgeschlossen ist. Wie kopierst du die datei in deinen container rein? Wenn ich Sicherheitsbedenken hätte würde ich die Werte ja eher aus dem environment lesen anstatt aus einer Datei.

Ich hänge noch ein bißchen bei den Werten für oAuth fest, aber über das ursprungsproblem bin ich quasi weg. Lass den issue noch offen, weil nicht klar ist wie man die werte in den container kriegt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant