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

meddleware broken with config v.3.0 #87

Open
fernandocanizo opened this issue Dec 4, 2018 · 0 comments
Open

meddleware broken with config v.3.0 #87

fernandocanizo opened this issue Dec 4, 2018 · 0 comments

Comments

@fernandocanizo
Copy link

config package made its returned objects sealed on version 3.0. This breaks meddleware:

$ node maps.js 
/tmp/map-server/node_modules/meddleware/lib/util.js:50
    obj && (obj.name = name);
                     ^

TypeError: Cannot add property name, object is not extensible
    at nameObject (/tmp/map-server/node_modules/meddleware/lib/util.js:50:22)
    at /tmp/map-server/node_modules/meddleware/lib/util.js:38:16
    at Array.map (<anonymous>)
    at Object.mapValues (/tmp/map-server/node_modules/meddleware/lib/util.js:36:29)
    at Function.onmount (/tmp/map-server/node_modules/meddleware/index.js:196:14)
    at Object.onceWrapper (events.js:315:30)
    at emitOne (events.js:121:20)
    at Function.emit (events.js:211:7)
    at Function.<anonymous> (/tmp/map-server/node_modules/express/lib/application.js:238:8)
    at Array.forEach (<anonymous>)

There is a work around given on this config issue, however having immutable and sealed objects on require('config') is desirable.

Do you think meddleware can do something about it?

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