I used to have a problem with the deployment of an API using @ iota / client for sending and receiving messages using AWS services. I will show you a line of changes that I have been applying according to the recommendations and ideas that emerged.
- The dependencies of @ iota / client were installed correctly in their latest versions according to the documentation and the testing was done locally, all with successful results.
- Then we deployed using the AWS-EC2 services, under a Node 12 environment on linux, however an error occurs in the installation of the @ iota / client dependency. (img)
- We added a. npmrc file "unsafe-perm = true", however we get the same error in the installation.
- We installed the aws-sdk dependency for a possible solution. The same error occurred.
- After a few requests in the IOTA Discrod, it was recommended the installation of @ iota / client but under the command --unsafe-perm, unfortunately the same error appeared.
- It was advised to install with sudo in case of error, I use Win10Pro so I asked a partner to do a test he uses Debian 10, and after some changes in versions (Node 14,16.1, @ iota / client 0.4 .0, aws-sdk 2.909.0, pg 8.6.0 and it was adding a. ebignore file “! node_modules") Once the changes were applied, the deployment was successful.
- I have cloned the modifications to perform the deployment in Win but the same error was returned.
- We suspect that it could be caused by the operating system used, so I set up a VM on Ubuntu 20. Setting up the requirements but getting the same error.
As a result of these events, the causes would be a version incompatibility problem between the dependencies and the AWS EC2 also modifications of the dependency files based on your OS (node and @ iota / client - Win and Linux). In the same way, prior to the use of AWS, Heroku was used, resulting in a correct deployment without the need to add other files or dependency files and at the first time.