在AWS Greengrass中出现“NodeJS 12.x: Not found Error”错误通常是因为AWS Greengrass设备上没有安装Node.js 12.x版本。解决此问题的方法是通过在AWS Greengrass设备上安装Node.js 12.x。
以下是一种解决方法的示例代码:
在AWS Greengrass设备上打开终端或SSH连接。
运行以下命令,以下载和安装Node.js 12.x版本:
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs
node -v
如果输出显示12.x版本号,则表示Node.js已成功安装。
sudo systemctl restart greengrass
现在,您的AWS Greengrass设备应该能够找到Node.js 12.x,并且不再显示“NodeJS 12.x: Not found Error”错误。