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

Fixed issue #174 #175

Open GeneUNCG opened 12 months ago

GeneUNCG commented 12 months ago

Fixed issue #174

Krxtopher commented 12 months ago

@GeneUNCG, thanks for the contribution! I've reviewed and tested your PR. There's one problem I'm experiencing that is easy to fix. When I attempt to run npm run start-babylon I get the following error:

[webpack-cli] TypeError: cli.isMultipleCompiler is not a function
    at Command.<anonymous> (/Users/schultkr/Documents/Git/amazon-sumerian-hosts/node_modules/webpack-cli/node_modules/@webpack-cli/serve/lib/index.js:146:35)
    at async Promise.all (index 1)
    at async Command.<anonymous> (/Users/schultkr/Documents/Git/amazon-sumerian-hosts/node_modules/webpack-cli/lib/webpack-cli.js:1672:7)

This problem is resolved if, use a clean version of this branch, I:

  1. Delete the "package-lock.json" file at the root of the repo.
  2. Run npm install, thus generating a new "package-lock.json" file.
  3. Try running npm run start-babylon again.

Can you please regenerate that "package-lock.json" file and commit the new version as part of your PR?

P.S. I don't think you introduced this error. I noticed the problem was introduced with the latest commit in the "mainline2.0" branch.

GeneUNCG commented 12 months ago

@GeneUNCG, thanks for the contribution! I've reviewed and tested your PR. There's one problem I'm experiencing that is easy to fix. When I attempt to run npm run start-babylon I get the following error:

[webpack-cli] TypeError: cli.isMultipleCompiler is not a function
    at Command.<anonymous> (/Users/schultkr/Documents/Git/amazon-sumerian-hosts/node_modules/webpack-cli/node_modules/@webpack-cli/serve/lib/index.js:146:35)
    at async Promise.all (index 1)
    at async Command.<anonymous> (/Users/schultkr/Documents/Git/amazon-sumerian-hosts/node_modules/webpack-cli/lib/webpack-cli.js:1672:7)

This problem is resolved if, use a clean version of this branch, I:

  1. Delete the "package-lock.json" file at the root of the repo.
  2. Run npm install, thus generating a new "package-lock.json" file.
  3. Try running npm run start-babylon again.

Can you please regenerate that "package-lock.json" file and commit the new version as part of your PR?

P.S. I don't think you introduced this error. I noticed the problem was introduced with the latest commit in the "mainline2.0" branch.

Hey @Krxtopher, thank you for reviewing my PR. Yes, I am getting the same issue as you, even with a fresh clone of this repository. I modified this file online, but I can create a separate commit submitting the package-lock.json if you would like.

EDIT: I am unsure how to resolve this error, I am assuming we would need to update the webpack-cli package?

Krxtopher commented 11 months ago

You shouldn't have to modify anything by hand. Just follow the steps I describe above, and then commit the new "package-lock.json" file that gets generated.

trusktr commented 10 months ago

I had this issue too, and it is not related to this pull request.

The best solution in my opinion is to pin the versions of webpack libs that we need until we're ready to explicitly update them. Here's a PR with the fix:

If that goes in first, this PR will work fine.

theVoiceMouse commented 9 months ago

npm update webpack-cli fixes this temporarily for anyone seeing the problem until this PR gets committed

trusktr commented 8 months ago

Also this branch,

removes the webpack build (only Karma testing still uses webpack because Karma is too old (no longer maintained) to understand JS modules, but the configuration is much simplified), converts to everything to vanilla JavaScript modules, and all the examples work without any build needed (just run a static web server with npm start). The only problem left to solve is to fix Babylon animations that broke with the Babylon v5+ upgrade:

After the Babylon fix, vanilla JS modules will be good to go.

This will make maintenance of sumerian easier; people can get started without annoying build/dependency hiccups, and people can bundle their apps any way they see fit on their end.