-
Notifications
You must be signed in to change notification settings - Fork 27
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
Pnpm install issues #243
Comments
aws-crt-nodejs is primarily a native addon (with a parallel browser implementation based on mqtt-js and other pure js libraries). The package that gets published to npm contains binaries for OsX, 32 and 64 bit Windows, x64 linux and armv8 linux. |
Hey @bretambrose thanks for the context. It appears that the module resolution is failing in aws-crt-nodejs/lib/native/binding.js Line 46 in d751ed6
yarn and pnpm hoist their modules to the root directory of a project. So the binding isn't in the local child node_modules folder.
We aren't using MQTT or anything that relies on this (to my knowledge). Our application uses cognito + s3 parts of the AWS SDK. Is there any way to disable this warning? |
this issue happens with @aws-sdk/client-s3 and NPM
with these dependencies:
|
I've tried to fix this with It turns out After I fix the path to point to Error: Cannot find module '/xyz/clients/src/app/node_modules/aws-crt/dist/bin/darwin-x64/aws-crt-nodejs.node'
// Also fails without .node
Error: Cannot find module '/xyz/clients/src/app/node_modules/aws-crt/dist/bin/darwin-x64/aws-crt-nodejs' The Is it possible that something is corrupted in how the postinstall Currently blocked on this issue and am trying to figure out a way to disable or mock out the missing require (as our code doesn't use this, at least not to my knowledge.) |
Additional context, we are running this in node also to @lukasa1993's point, we are using the
|
i am using node 14 so its just lib is bad i downgraded to strict "3.24" instead of ^ and probably will never upgrade this lib it seems everything aws is just faulty and pre-alpha version |
Found another thread where folks are also experiencing the "not found" issue aws/aws-sdk-js-v3#2750 (comment) |
A while back, I remember trying pnpm with a CRT-based app and not being able to reproduce this issue. I tried again recently and had no luck either. The issue may still be present but I don't think it's just pnpm alone. I feel like there's additional project setup/config (bundling/stripping/packing etc...) needed at a minimum. Closing for now, but am happy to look again at it should explicit repro be found. |
We just switched from
npm
topnpm
for faster installs & a monorepo setup.It appears there are some issues with this package
It appears that the bin is missing?
This is a related issue. aws/aws-iot-device-sdk-js-v2#119 (comment)
Stackoverflow suggested copying the bin where it needs to go https://stackoverflow.com/questions/68063950/aws-iot-sdk-js-v2-connection-problem-aws-crt-binary-not-present-in-any-of-the
Any pointers on how to solve this. I'm unfamiliar with this package and am wondering why it needs a bin to run as we are consuming the SDK in our next.js application
Thanks 😃
The text was updated successfully, but these errors were encountered: