You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've had a few number of issues with deps lately in my pnpm monorepo, so i'm trying to dive a bit deeper to understand whats going on, and taking the issue below to do so.
For background; i'm on the latest pnpm (9.12.1 and have tried older), using a monorepo. My workspace file is as follows (and the project i'm working on rn is backend:
FAIL <snip> ● Test suite failed to run
Cannot find module '@aws-sdk/core' from '../node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@aws-sdk/lib-dynamodb/dist-cjs/index.js'
Ok - so where is @aws-sdk/core? My cwd is /backend, so i check backend/node_modules:
Hmm - this seems odd. From how i understand packages that are dependencies should always show up at the root, and be (soft) symbolically linked in.
Probably doesn't matter much - the above search within lib-dynamodb isn't in the backend dir anyways, its in the root node_modules. So lets take a look in there:
Ok, sure enough, its not there either. Which perhaps isn't a huge surprise, because @aws-sdk/core is not listed as a dependency of lib-dynamodb - it is of client-dynamodb.
So how then do all these nested upon nested deps get resolved? This is where my understanding breaks down.
For the record there are seemingly a zillion references to different versions of @aws-sdk/core in my lock file, so i suspect this and me recently adding a gargantuan lib (cough cough llamaindex) isn't helping me here.
And the kicker; the only workaround i currently have for this is to install @aws-sdk/core in the workspace root 😭. It feels like something is broken in my setup as all this should just work, so any tips to fill in my understanding or where to look next would be appreciated!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I've had a few number of issues with deps lately in my pnpm monorepo, so i'm trying to dive a bit deeper to understand whats going on, and taking the issue below to do so.
For background; i'm on the latest pnpm (9.12.1 and have tried older), using a monorepo. My workspace file is as follows (and the project i'm working on rn is
backend
:Today, i got this error while running a test:
Ok - so where is @aws-sdk/core? My cwd is /backend, so i check backend/node_modules:
Hmm - this seems odd. From how i understand packages that are dependencies should always show up at the root, and be (soft) symbolically linked in.
Probably doesn't matter much - the above search within lib-dynamodb isn't in the backend dir anyways, its in the root node_modules. So lets take a look in there:
Ok, sure enough, its not there either. Which perhaps isn't a huge surprise, because @aws-sdk/core is not listed as a dependency of lib-dynamodb - it is of client-dynamodb.
https://github.com/aws/aws-sdk-js-v3/blob/main/lib/lib-dynamodb/package.json
https://github.com/aws/aws-sdk-js-v3/blob/534e028f7f8cb6f20fe9be0b61aba19e05bbd461/clients/client-dynamodb/package.json#L25C4-L25C26
So how then do all these nested upon nested deps get resolved? This is where my understanding breaks down.
For the record there are seemingly a zillion references to different versions of @aws-sdk/core in my lock file, so i suspect this and me recently adding a gargantuan lib (cough cough llamaindex) isn't helping me here.
And the kicker; the only workaround i currently have for this is to install @aws-sdk/core in the workspace root 😭. It feels like something is broken in my setup as all this should just work, so any tips to fill in my understanding or where to look next would be appreciated!
Beta Was this translation helpful? Give feedback.
All reactions