UnityRenderStreaming
UnityRenderStreaming copied to clipboard
[BUG]: WebApp dependency is incorrectly placed in devDependencies
Package version
3.1.0-exp.3
Environment
When deploying the WebApp to a server like Heroku or Google Cloud, these platforms install dependencies but ignore devDependencies, which make total sense. When this happens the app crashes on start because it can't find 'commander'. When looking at who depends on this package:
[email protected] $user\Projects\WebApp
`-- [email protected]
+-- [email protected]
`-- [email protected]
`-- [email protected]
'newman' is right now included as a devDependency and should be moved to 'dependencies'.
Steps To Reproduce
I don't know exactly how Google Cloud or Heroku setup applications internally, so here's what I'm doing to run the app without dev dependencies:
- Clone repo.
- Navigate to WebApp.
- npm install #(this will install both dev and prod dependencies)
- npm run build #(use dev dependencies to generate build)
- delete node_modules folder
- Remove the 'prestart' and 'postinstall' commands from package.json. This is triggering a npm install and it will install dev dependencies again, which we are trying to avoid.
- npm install --only=prod #(make sure we don't install dev dependencies)
- npm start
And the result is: Error: Cannot find module 'commander'
Because this is included through newman dependencies, and should be included as a dependency for this package directly.
Current Behavior
No response
Expected Behavior
No response
Anything else?
No response
@gpiffaretti
newman package is used for only testing APIs.
Could you tell me how do we reproduce your issue?
Ok then 'commander' should be included as a dependency. It's used in index.js:

But when running things locally, this package is present because it's included through newman.
I'll update reproduce steps in the issue.
BTW, with this fix and some minor adaptations for Heroku, I was able to deploy the app successfully.
@gpiffaretti
OK, all right. we should fix the package.json to add dependencies commander package.
Thanks for your advice.
memo: URS-433