aws-samples / amazon-sumerian-hosts

Amazon Sumerian Hosts (Hosts) is an experimental open source project that aims to make it easy to create interactive animated 3D characters for Babylon.js, three.js, and other web 3D frameworks. It leverages AWS services including Amazon Polly (text-to-speech) and Amazon Lex (chatbot).
MIT No Attribution
175 stars 80 forks source link

GET /_next/webpack-hmr 404 #187

Open flckv opened 8 months ago

flckv commented 8 months ago

I ran npx serve . at .../aws_sumerian/packages/amazon-sumerian-hosts-three

I receive error:

 HTTP  10/11/2023 11:06:51 AM ::1 Returned 404 in 0 ms
 HTTP  10/11/2023 11:06:51 AM ::1 GET /_next/webpack-hmr

I did the AWS-Infrastructure-Setup.md step, where I added: const cognitoIdentityPoolId = '....'; module.exports = cognitoIdentityPoolId; in .../aws_sumerian/demo-credentials.js

trusktr commented 8 months ago

Hello @flckv, you may have better luck trying to run the version of amazon-sumerian-hosts where I've removed the Webpack build and everything runs as native JS modules in the browser, in this branch:

https://github.com/aws-samples/amazon-sumerian-hosts/pull/183

The amazing thing about the vanilla ESM setup is that random issues, like what you have related to the Webpack build tool, are a thing of the past. Plain JS modules will work in any browser, forever. :)

You can clone that fork, then you can run the following, and it will simply work:

npm install
npx serve .

Additionally, if you look at the package.json scripts, you'll see start-three, which does the same thing you did (but using the five-server package instead of the serve package).

All code in that branch is plain JavaScript, requires no build at all (unless you want to produce TypeScript declaration files for the Babylon lib, in which case the npm run build script will generate .d.ts file, but it will not build any JS), and runs in a browser as-is.