-
-
Notifications
You must be signed in to change notification settings - Fork 724
Closed
Description
Similar to the closed issue #703 (but with a newer version of restify)
Expected Behavior
It should start the restify server without problems.
Current Behavior
As soon as restify is imported an error is thrown: [ERR_ASSERTION]: Constructor already exists!
Possible Solution
To use inversify-restify-utils@3.3.1 I had to downgrade Restify to restify@6.3.2
Steps to Reproduce (for bugs)
Clone the following repo: https://github.com/hlibco/restify-inversify-constructor-error
- install dependencies
yarn installornpm install - run
yarn startornpm start - you should get the error
node_modules/restify-errors/lib/index.js:67
assert.equal(typeof module.exports[name], 'undefined',
^
AssertionError [ERR_ASSERTION]: Constructor already exists!
Your Environment
- node v9.4.0
"inversify": "4.11.1",
"inversify-restify-utils": "3.3.1",
"reflect-metadata": "^0.1.12",
"restify": "7.1.1",
Stack trace
/Users/earth/git-public/restify-inversify-problem/node_modules/restify-errors/lib/index.js:67
assert.equal(typeof module.exports[name], 'undefined',
^
AssertionError [ERR_ASSERTION]: Constructor already exists!
at Object.makeConstructor (/Users/earth/git-public/restify-inversify-problem/node_modules/restify-errors/lib/index.js:67:12)
at Object.<anonymous> (/Users/earth/git-public/restify-inversify-problem/node_modules/restify/lib/errorTypes.js:5:8)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/earth/git-public/restify-inversify-problem/node_modules/restify/lib/index.js:14:1)
mgebundy
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done