hydra-newmedia / passport-headerapikey

Api key authentication strategy for Passport, which only handles headers (not body fields).
28 stars 6 forks source link

Cannot find module '../node_modules/passport-headerapikey' #2

Closed peteralt closed 6 years ago

peteralt commented 6 years ago

Hi there,

I have a project, that hasn't been updated in a few weeks and suddenly it's crashing with the error message in the title - it cannot find the module.

Neither npm install throws an error nor is the module missing in node_modules. The server environment has been the same as before with Node 6x and locally I tried with Node 6 and 9.

"passport": "^0.4.0", "passport-http": "^0.3.0", "passport-local": "^1.0.0", "passport-headerapikey": "^1.0.4"

That's the snipped from my package.json file. Any idea what might have happened? Again, nothing in the project has been touched, simply tried to update my Elastic Beanstalk application.

Thanks so much :-)

peteralt commented 6 years ago

Update: This seems to be happening with 1.0.4 only. Reverting to 1.0.3 seems to work just fine.

guischdi commented 6 years ago

Hi @peteralt ,

The only thing that has changed on our side from v1.0.3 to v1.0.4 is the readme file. But the problem was: I forgot it's a typescript project which needs to be built before publishing. I now published v1.0.5 with a built library again.

Sorry for this faux pas! Didn't work on this repository for two years. Hope I fixed it for you. Feel free to close this issue, if so!

peteralt commented 6 years ago

Awesome, just verified that it works with 1.0.5.

When I went through the code changes I was wondering why it stopped working since as you mentioned, the only changes were in the readme file. But your explanation makes sense and I'm glad you were able to resolve this quickly. Thanks so much!

guischdi commented 6 years ago

No problem! You're welcome