stomp-js / rx-stomp

STOMP adaptor for RxJS
Apache License 2.0
110 stars 21 forks source link

Missing stompjs dependency #543

Open awallat opened 8 months ago

awallat commented 8 months ago

After updating from rx-stomp 1.2.0 -> 2.0.0 my app is not running anymore and it complains about:

Error: node_modules/@stomp/rx-stomp/esm6/rx-stomp.d.ts:2:84 - error TS2307: Cannot find module '@stomp/stompjs' or its corresponding type declarations.

I saw that the stompjs-library is not there anymore and yarn (3.6.3) was giving this warning:

YN0002: │ xxxxxx@workspace:. doesn't provide @stomp/stompjs (pbbbdc), requested by @stomp/rx-stomp

image

Adding the latest stompjs lib (7.0.0) to my package.json fixes the issue. Do I need to provide it manually with 2.0.0?

kum-deepak commented 8 months ago

Many thanks for the report. Your solution is correct.

The dependency has been marked as a peerDependencies in v2.0.0 from dependencies in earlier versions. This is to avoid getting a duplicate copy of rxjs installed in a few cases.

The package manager should have ensured at least one copy is installed.

I will add that in a few cases, you may need to install dependencies explicitly.

LeLunZ commented 3 weeks ago

Same error happening here :) package managers like npm don't install pear dependencies automatically. But npm usually gives warnings.