diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index e437b49..6835b35 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -19,7 +19,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 21 + node-version: 20.x cache: "npm" - name: Install packages working-directory: norbit-webapp @@ -39,7 +39,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [18.x, 20.x, 21.x] + node-version: [18.x, 20.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: diff --git a/norbit-webapp/components/AmplifyInitializer/AmplifyInitializer.tsx b/norbit-webapp/components/AmplifyInitializer/AmplifyInitializer.tsx index 8cdce8e..1967477 100644 --- a/norbit-webapp/components/AmplifyInitializer/AmplifyInitializer.tsx +++ b/norbit-webapp/components/AmplifyInitializer/AmplifyInitializer.tsx @@ -1,5 +1,5 @@ import { useEffect } from "react"; -import { Amplify } from "aws-amplify"; +import { Amplify, PubSub } from "aws-amplify"; import { AWSIoTProvider } from "@aws-amplify/pubsub"; import { useDispatch, useSelector } from "react-redux"; import { setInitialized } from "redux/slices/amplifySlice"; @@ -20,7 +20,7 @@ const AmplifyInitializer: React.FC = ({ children }) => if (!isMock) { console.log("Running Amplify in live mode"); Amplify.configure(amplifyConfig); - Amplify.addPluggable( + PubSub.addPluggable( new AWSIoTProvider({ aws_pubsub_region: process.env.NEXT_PUBLIC_REGION, aws_pubsub_endpoint: `wss://${process.env.NEXT_PUBLIC_MQTT_ID}/mqtt`,