aws-samples / aws-appsync-iot-core-realtime-dashboard

This sample application demonstrates a React based web dashboard receiving real-time updates from IoT sensors. The solution is built with AWS AppSync, AWS Amplify, Amazon Location Service, and AWS IoT Core technologies.
MIT No Attribution
112 stars 31 forks source link

index.js not found #7

Closed mstfldmr closed 2 years ago

mstfldmr commented 3 years ago

After following the steps, the dashboard cant be started because index.js doesn't exist.

(base) aldemim@3c22fb0301d7 web % node index.js

internal/modules/cjs/loader.js:883
  throw err;
  ^

Error: Cannot find module '/Users/aldemim/ws/aws-appsync-iot-core-realtime-dashboard/web/index.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

(base) aldemim@3c22fb0301d7 web % ll
total 1288
drwxr-xr-x     7 aldemim  staff     224 Dec 10 01:05 amplify
-rw-r--r--     1 aldemim  staff     377 Dec 10 00:25 amplify.yml
-rw-r--r--     1 aldemim  staff      63 Dec 10 00:25 babel.config.js
drwxr-xr-x  1112 aldemim  staff   35584 Dec 10 00:26 node_modules
-rw-r--r--     1 aldemim  staff  641509 Dec 10 00:25 package-lock.json
-rw-r--r--     1 aldemim  staff    1566 Dec 10 00:25 package.json
drwxr-xr-x     6 aldemim  staff     192 Dec 10 00:25 public
drwxr-xr-x    15 aldemim  staff     480 Dec 10 00:28 src
-rw-r--r--     1 aldemim  staff     491 Dec 10 00:25 tsconfig.json

(base) aldemim@3c22fb0301d7 web % ll src 
total 88
-rw-r--r--  1 aldemim  staff  7249 Dec 10 01:13 API.ts
-rw-r--r--  1 aldemim  staff  1081 Dec 10 00:25 App.tsx
drwxr-xr-x  3 aldemim  staff    96 Dec 10 00:25 api
-rw-r--r--  1 aldemim  staff   692 Dec 10 01:13 aws-exports.js
drwxr-xr-x  7 aldemim  staff   224 Dec 10 00:25 components
drwxr-xr-x  6 aldemim  staff   192 Dec 10 00:25 graphql
-rw-r--r--  1 aldemim  staff   799 Dec 10 00:25 index.tsx
drwxr-xr-x  4 aldemim  staff   128 Dec 10 00:25 pages
-rw-r--r--  1 aldemim  staff    40 Dec 10 00:25 react-app-env.d.ts
-rw-r--r--  1 aldemim  staff  5213 Dec 10 00:25 serviceWorker.ts
-rw-r--r--  1 aldemim  staff   125 Dec 10 01:16 settings.json
-rw-r--r--  1 aldemim  staff   255 Dec 10 00:25 setupTests.ts
-rw-r--r--  1 aldemim  staff   366 Dec 10 00:25 theme.tsx
dave-moser commented 2 years ago

The node index.js step is used to start the Sensor simulators. That is executed from the /sensor folder (after you complete the other steps related to configuring the sensors).

For the web dashboard, you run the command "npm start"