feathers icon indicating copy to clipboard operation
feathers copied to clipboard

Add @feathersjs/transport-common to authentication-local as dep?

Open josephstgh opened this issue 7 years ago • 9 comments

Hi,

If I did not install @feathersjs/transport-common, and run a npm run build, it will throw this error.

image

Would it be better for authentication-local to add @feathersjs/transport-common as dep rather than adding in my project?

Thanks.

josephstgh avatar Nov 13 '19 08:11 josephstgh

I'm not sure where this is coming from. Nothing in that module depends on it. 🤔

daffl avatar Nov 15 '19 05:11 daffl

Let me double check my config again, will update after I check.

josephstgh avatar Nov 15 '19 19:11 josephstgh

The reference definitely shows up in the compiled files. I'm just not sure why. I don't think it's your configuration though.

daffl avatar Nov 15 '19 19:11 daffl

I see. I thought I remember it wrongly as I do not have access to the source code right now.

I'll try to see if I can dig up more info after I have access to it.

josephstgh avatar Nov 16 '19 06:11 josephstgh

I verified this again, but have no idea why is this so as well.

josephstgh avatar Nov 20 '19 16:11 josephstgh

Ok, I think it's because of the dependency on @feathersjs/authentication. I don't think you should get this error (or have to install @feathersjs/transport-commons separately) if everything got installed properly. How can this be reproduced?

daffl avatar Nov 20 '19 18:11 daffl

I am suspecting it is due to the package-lock.json file not correctly updated after the upgrades. I tested on the newly setup app without @feathersjs/transport-commons and it seem to works fine.

Will update here again to see if I can uninstall @feathersjs/transport-commons and re-generate the package-lock.json to see if it works.

josephstgh avatar Nov 20 '19 18:11 josephstgh

I did some test and found out that if I'm using @feathersjs/client as devDep instead of @feathersjs/authentication-client, @featherjs/rest-client, and @featherjs/socketio-client. It will trigger the error when I build. So initially, I suspected that it could be one of the three that is pulling in the @feathersjs/transport-common.

Then I tested again to confirm my suspicion on package-lock.json. So I removed @feathersjs/transport-common and kept @feathersjs/client. I deleted the existing package-lock.json and then do a npm i then run a build. This time it works.

So it looks like package-lock.json is the issue here. Re-generating resolve it, it seem.

josephstgh avatar Nov 21 '19 10:11 josephstgh

Great, thank you for double checking! I think we can close this then.

daffl avatar Nov 21 '19 17:11 daffl