Azure-Samples / active-directory-node-webapi

A NodeJS web API that is secured using Azure AD and OAuth 2.0 access tokens.
105 stars 64 forks source link

Error running example #22

Closed rodriamaro closed 4 years ago

rodriamaro commented 7 years ago

I'm following the steps and I'm facing this problem:

util.js:989
    throw new TypeError('The super constructor to "inherits" must not ' +
    ^

TypeError: The super constructor to "inherits" must not be null or undefined
    at Object.exports.inherits (util.js:989:11)
    at Object.<anonymous> (/Users/rodrigo/Development/sandbox/active-directory-node-webapi/node-server/app.js:237:6)
    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.runMain (module.js:605:10)
    at run (bootstrap_node.js:423:7)
    at startup (bootstrap_node.js:147:9)
    at bootstrap_node.js:538:3
node -v
v7.9.0

Following the stacktrace, this looks when node is loading the restify lib

iRockyZhou commented 7 years ago

+1

idkjs commented 7 years ago

Ended up here looking for a solution to same issue. Seems like the holy grail for the Azure Demo: https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-devquickstarts-webapi-nodejs...

archetypalsxe commented 6 years ago

Having this problem as well, will this get an update?

veljkoz commented 5 years ago

I don't remember how I ended up here, but after giving up on fixing the app, I found a really good blog: https://blogs.msdn.microsoft.com/kaevans/2017/03/10/creating-a-node-js-application-secured-by-azure-ad/

derisen commented 4 years ago

Closing this issue as there's a more recent sample here