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 when hosts array uses process.env for lambda/claudiajs #41

Open
msolovyov opened this issue May 16, 2017 · 1 comment
Open

error when hosts array uses process.env for lambda/claudiajs #41

msolovyov opened this issue May 16, 2017 · 1 comment

Comments

@msolovyov
Copy link

const mc = new memcached({hosts: [process.env.memcache], autodiscover: true})

babel src --out-dir bin

src/api.js -> bin/api.js
validating package
TypeError: Cannot read property 'split' of undefined
at Client.splitHost (/private/var/folders/w4/0_jcj9dd67g3ycr39nbzp8kh0000gn/T/9b8b4587-e1c6-4219-a679-a574b6c692fc/node_modules/memcache-plus/lib/client.js:230:19)
at Client. (/private/var/folders/w4/0_jcj9dd67g3ycr39nbzp8kh0000gn/T/9b8b4587-e1c6-4219-a679-a574b6c692fc/node_modules/memcache-plus/lib/client.js:153:22)
at Array.map (native)
at Client.getHostList (/private/var/folders/w4/0_jcj9dd67g3ycr39nbzp8kh0000gn/T/9b8b4587-e1c6-4219-a679-a574b6c692fc/node_modules/memcache-plus/lib/client.js:152:35)
at Client.connect (/private/var/folders/w4/0_jcj9dd67g3ycr39nbzp8kh0000gn/T/9b8b4587-e1c6-4219-a679-a574b6c692fc/node_modules/memcache-plus/lib/client.js:79:14)
at new Client (/private/var/folders/w4/0_jcj9dd67g3ycr39nbzp8kh0000gn/T/9b8b4587-e1c6-4219-a679-a574b6c692fc/node_modules/memcache-plus/lib/client.js:61:10)
at Object. (/private/var/folders/w4/0_jcj9dd67g3ycr39nbzp8kh0000gn/T/9b8b4587-e1c6-4219-a679-a574b6c692fc/bin/api.js:68:12)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at validatePackage (/Users/m/.npm-packages/lib/node_modules/claudia/src/tasks/validate-package.js:15:15)
at initEnvVarsFromOptions.then.then.then.then.then.then.then.dir (/Users/m/.npm-packages/lib/node_modules/claudia/src/commands/update.js:140:10)

@victorquinn
Copy link
Owner

victorquinn commented May 19, 2017

Are you sure process.env.memcache has a value?

We should certainly fix the library to give a better error if an array with [undefined] is sent to the initialization but it really looks like your process.env.memcache is set to undefined

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

2 participants