aws / aws-sdk-js

AWS SDK for JavaScript in the browser and Node.js
https://aws.amazon.com/developer/language/javascript/
Apache License 2.0
7.59k stars 1.55k forks source link

issue in installing aws-sdk@2.1572.0 #4602

Closed nishikant-rsystems closed 5 months ago

nishikant-rsystems commented 6 months ago

Describe the bug

aws-sdk@2.1572.0 postinstall /mnt/ebs/codeVKAPIs/vk-api-webservices/routes/vk-api-early_checkin/node_modules/aws-sdk node scripts/warn-maintenance-mode.js

sh: node: command not found

Expected Behavior

it should install the version properly

Current Behavior

Giving node command not found error

Reproduction Steps

RUN npm i aws-sdk

while installing the package it gave an error for the latest aws-sdk version.

Possible Solution

No response

Additional Information/Context

No response

SDK version used

2.1572.0

Environment details (OS name and version, etc.)

linux

BenHwem commented 6 months ago

We had the same issue, in our case we found a workaround by making sure that Node is available to all users on the system, as Node was only available to the root user. We are using an elastic beanstalk environment and a post deploy script to install Node using NVM. Happy to share the workaround if this scenario is the same for you?

aBurmeseDev commented 6 months ago

Hi @nishikant-rsystems - thanks for reaching out. As mentioned by previous comment, it could be because Node is only available to root users and not to non-root users. I would also make sure npm file is in appropriate path/folder.

You can verify if node is installed on current user by running node -v in your terminal. Here's one resource I found that might be useful as there are many suggestions for your reference: https://stackoverflow.com/questions/31472755/sudo-npm-command-not-found

Hope it helps, John

github-actions[bot] commented 5 months ago

This issue has not received a response in 1 week. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing.