Open aval13 opened 3 years ago
Hi, I successfully build the UI and setup nginx to serve the dashboard and proxy request to sensu api backend. docker build instruction
I would appreciate any feedback and comment. Let me know if I can PR this.
Hi, I successfully build the UI and setup nginx to serve the dashboard and proxy request to sensu api backend. docker build instruction
I would appreciate any feedback and comment. Let me know if I can PR this.
Thank you for this! Following your docker file I was able to find that I could run yarn install
without the --production
flag, and then set NODE_ENV=production
and run yarn run build
, and that got everything into a working state using NodeJS 14.x.
I am trying to build the app for use in a production environment while being behind a proxy. Some of the commands in the installation instructions page work partially, some not at all.
Expected Behavior
Run the commands from the INSTALL.md page and work. Since the target is production, using the commands specified for production environments should work.
Current Behavior
I have tried 2 setups, both on a Debian 10 fully uptodate:
I could not find any difference in the outcome no matter the versions used, only some minor text or cosmetic changes in the error outputs.
Since I am behind a proxy, the env variables http_proxy and https_proxy are exported at all times. I have tried multiple combinations of the commands from the install page, below the issues found. I did all the tests running as root to make sure there is no access issue i may miss.
Issues, regardless of yarn and nodejs versions:
HttpError: request to https://api.github.com/repos/sensu/sensu-go/contents/backend/apid/graphql/schema?ref=4fbba86 failed, reason: read ECONNRESET at /opt/sensu/web/node_modules/@octokit/request/lib/request.js:94:13 at processTicksAndRejections (node:internal/process/task_queues:96:5) { status: 500, headers: {}, request: { method: 'GET', url: 'https://api.github.com/repos/sensu/sensu-go/contents/backend/apid/graphql/schema?ref=4fbba86', headers: { accept: 'application/vnd.github.v3+json', 'user-agent': 'octokit.js/16.23.2 Node.js/16.8.0 (Linux 4.19; x64)' }, request: { validate: { owner: { required: true, type: 'string' }, path: { required: true, type: 'string' }, ref: { type: 'string' }, repo: { required: true, type: 'string' } } } } }
root@test01:/opt/sensu/web# yarn install --modules-folder /opt/sensu/yarn/node_modules [...] $ yarn fetch-schema yarn run v1.22.5 $ node scripts fetch-schema node:internal/modules/cjs/loader:936 throw err; ^
Error: Cannot find module 'esm' Require stack:
Conclusions so far based on points 1 and 2:
Error: Cannot find module 'esm' Require stack:
However the module looks like it's there:
Possible Solution
I have no idea. I'm a sysadmin, i have previously deployed apps with nodejs and npm, never worked with yarn before.
Steps to Reproduce
See the Current Behaviour above.
Context
Unable to build the app behind a proxy. Unable to use best practices for production build.
Your Environment