feathersjs / feathers

The API and real-time application framework
https://feathersjs.com
MIT License
14.97k stars 742 forks source link

Re-initialize a service with children. #3432

Closed nikitamorozov closed 4 months ago

nikitamorozov commented 4 months ago

Steps to reproduce

Use 5.0.22

I initialized 2 services

app.use('/service1', svc1);
app.use('/service1/subservice', svc2);

Then I tried to re-initialize srv1

app.unuse('/service1');
app.use('/service1', svc1);

And after unuse the service with path /service1, I can't initialize the service with path /service1 again. I got "Path /service1 already exists" error

Expected behavior

No errors

Actual behavior

I got "Path /service1 already exists" error

System configuration

Tell us about the applicable parts of your setup.

Module versions (especially the part that's not working): Verison 5.0.22

NodeJS version: v20.11.0

Operating System: N/a

Browser Version: N/a

React Native Version: N/a

Module Loader: N/a