jlguenego / node-expose-sspi

Expose Microsoft Windows SSPI to Node for SSO authentication.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to use package in TS express application

oyeb opened this issue · comments

Describe the bug
Build fails when I try to use this in a TS+Express project. An assumed member of Express has been used in v0.1.44. Interestingly, the output does appear in dist so you can run the server -- puzzling 🤔

My intention is to use this in a Nestjs project wherein the same error appears and we can't run the server.

To Reproduce

Try to build this vanilla express example project using npm run build && npm run start.

Try to build/run this vanilla nestjs example.

Trace


> express-simple@1.0.0 build C:\Users\abahadur\msft\express-simple-ts-example
> tsc -p .

node_modules/node-expose-sspi/src/sso/interfaces.ts:20:23 - error TS2694: Namespace 'global.Express' has no exported member 'Session'.

20     session?: Express.Session;
                         ~~~~~~~


Found 1 error.

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! express-simple@1.0.0 build: `tsc -p .`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the express-simple@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\abahadur\AppData\Roaming\npm-cache\_logs\2020-10-20T18_55_05_832Z-debug.log

Expected behavior
The build to sucees

Environment version:

  • OS: Windows 10 Pro version 1903 x64
  • Node version and architecture: 12.19.0 64bit

Additional context
I think the fix is already merged in master @ 6f991bf and we probably just need to cut out a patch release.

I tried tp build node-expose-sspi but there seems to be some issue with my C++ env.

Accepted. Please retry with 0.1.45

Awesome! 👍
Confirmed that v0.1.45 works.