Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with future v5 (aka Dove) #687

Closed
claustres opened this issue Sep 1, 2022 · 3 comments
Closed

Compatibility with future v5 (aka Dove) #687

claustres opened this issue Sep 1, 2022 · 3 comments

Comments

@claustres
Copy link

claustres commented Sep 1, 2022

We have migrated a project previously depending on Feathers v3 to v5 (v5.0.0-pre.28). It also uses this module in v5. Since then it seems that an incompatibility issue occurs, when launching the app errors like this appear systematically:

const debug = (0, commons_1.createDebug)('@feathersjs/feathers');
TypeError: (0 , commons_1.createDebug) is not a function

It seems to be related to the fact that feathers-hooks-common requires @feathersjs/commons v4.5.15 while the app requires v5.0.0-pre.28, which are probably not compatible.

Adding this to the package.json solve the problem but I am not sure about the implications:

"resolutions": {
  "@feathersjs/commons": "^5.0.0-pre.28"
}

Maybe some warnings should be stated if there are compatibility issues with the future release. Maybe others modules are also impacted, let me know what you think.

System configuration

Tell us about the applicable parts of your setup.

Module versions: feathersjs v5.0.0-pre.28 / feathers-hooks-common 5.0.6

NodeJS version: v16

@claustres
Copy link
Author

Thanks to module resolution of the package manager, nodejs should actually install then use both versions in isolation, one for the app and one for feathers-hooks-common. But that's not what we are seeing in practice. Could it be a bug in the package manager or nodejs ? Something related to the fact it's a prerelease ? Something related to our specific environment ?

@claustres
Copy link
Author

claustres commented Sep 2, 2022

I think it's definitely a bug in package manager resolution algorithm. Here is an example I have in my package.lock:

"node_modules/@feathersjs/commons": {
	"version": "5.0.0-pre.28",
        ...
},
"node_modules/feathers-mongodb": {
	"version": "3.4.0",
	"dependencies": {
		"@feathersjs/commons": "^1.4.4",
		"@feathersjs/errors": "^3.3.0",
		"lodash.omit": "^4.5.0",
		"uberproto": "^2.0.4"
	}
}

But at the end on the hard drive in my node_modules I get @feathersjs/commons v1.4.4 under feathers-mongodb as expected, but also at the root level in @feathersjs/commons instead of the expected v5.

The worst thing is that it does not occur when I install the app itself but when installing another app, just like if it is linked to the package manager cache.

@daffl
Copy link
Member

daffl commented Sep 7, 2022

Hm, linking things might be the issue here. There will definitely be a fully v5 compatible commons hooks soon though. feathers-mongodb is already available as a new version as @feathersjs/mongodb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants