auth0 / passport-windowsauth

Windows Authentication strategy for Passport.js
MIT License
178 stars 54 forks source link

node 0.12.0 incompatibility #25

Closed mycaule closed 6 years ago

mycaule commented 9 years ago

I recently updated to node 0.12.0 et get the following error with passport-windowsauth 0.1.11.

$ node server.js
module.js:355
  Module._extensions[extension](this, filename);
                               ^
Error: no errord:\Developpements\inal-console\node_modules\passport-windowsauth\node_modules\ldapjs\node_modules\buffertools\build\Release\buffertools.node
    at Error (native)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (d:\Developpements\inal-console\node_modules\passport-windowsauth\node_modules\ldapjs\node_modules\buffertools\buffertools.js:1:77)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)

Running the server with node 0.10.28 works fine.

Do you plan to support the new version of node ?

mycaule commented 9 years ago

Similar problems with migration to node 0.12 in gulp-sass package : https://github.com/dlmanning/gulp-sass/issues/189

jfromaniello commented 9 years ago

Did you try to remove node_modules and reinstall your deps? Since there is a native module there (compiled)

El mar, mar 3, 2015 08:03, Michel Hua notifications@github.com escribió:

Similar problems with migration to node 0.12 in gulp-sass package : dlmanning/gulp-sass#189 https://github.com/dlmanning/gulp-sass/issues/189

— Reply to this email directly or view it on GitHub https://github.com/auth0/passport-windowsauth/issues/25#issuecomment-76925917 .

mycaule commented 9 years ago

Yes but npm install passport-windowsauth@0.1.11 doesn't work at all.

I have this

...
gyp ERR! build error
gyp ERR! stack Error: `C:\windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (c:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "c:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd d:\Developpements\sandbox\node_modules\passport-windowsauth\node_modules\ldapjs\node_modules\buffertools
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
npm WARN engine mv@0.0.4: wanted: {"node":">=0.8.0 <0.10.0"} (current: {"node":"0.12.0","npm":"2.5.1"})
...
oronbz commented 9 years ago

I can also confirm, these module among many other ldap modules aren't compatible with version 0.12

jfromaniello commented 9 years ago

did you meant aren't compatible?

oronbz commented 9 years ago

Yup, thanks, typo fixed (:

mycaule commented 9 years ago

I fixed the problem upgrading the package to the latest version.

oronbz commented 9 years ago

I'm using

npm install passport-windows auth

on a brand new folder, it should download the latest version, but since ldapjs native code isn't compatible with node 0.12 this whole package fails installing

mycaule commented 9 years ago

You have to update passport to the latest version as well.