The web page cannot load resource files such as images when starting redash

Issue Summary

When I typed localhost:5000 in firefox, the following page appeared
image
At this point the following errors will pop up in the docker-compose up:

server_1 | ERROR in webpack [/app/redash/handlers/webpack.py:19]:
server_1 | Unable to load webpack manifest
server_1 | --------------------------------------------------------------------------------
server_1 | Traceback (most recent call last):
server_1 | File “/app/redash/handlers/webpack.py”, line 16, in get_asset
server_1 | with open(WEBPACK_MANIFEST_PATH) as fp:
server_1 | IOError: [Errno 2] No such file or directory: ‘/app/redash/handlers/…/…/client/dist/asset-manifest.json’

I don’t know what’s wrong, so I hope someone can help me. Thank you

Technical details:

  • Redash Version:
  • Browser/OS:centos7
  • How did you install Redash:
  1. Install docker

  2. Install nodejs

  3. git clone https://github.com/getredash/redash.git

  4. docker-compose up

  5. npm install

  6. Create tables docker -compose run --rm server create_db

  7. docker -compose run --rm postgres psql -h postgres -U postgres -c “create database tests”

  8. docker -compose -f docker -compose.yml up -d

But when I run NPM install it’s wrong:
npm WARN deprecated core-js@1.2.7: core-js@<2.6.8 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2.
npm WARN deprecated @mapbox/gl-matrix@0.0.1: This
npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
npm WARN deprecated @babel/polyfill@7.4.4: :rotating_light: As of Babel 7.4.0, this
npm WARN deprecated package has been deprecated in favor of directly
npm WARN deprecated including core-js/stable (to polyfill ECMAScript
npm WARN deprecated features) and regenerator-runtime/runtime
npm WARN deprecated (needed to use transpiled generator functions):
npm WARN deprecated
npm WARN deprecated > import “core-js/stable”;
npm WARN deprecated > import “regenerator-runtime/runtime”;
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated flatten@1.0.2: I wrote this module a very long time ago; you should use something else.

It definitely looks like something went wrong with the installation process. :frowning:

If you’re ok with re-doing it, since you’re using CentOS 7 maybe try this setup.sh script?

It’s a CentOS 7 specific version of the setup script, and I’ve used it a few times over the past few months for new installations. It “just works”.

Well, for me it has, and a few other people have mentioned using it as well. :smile:

It looks like you didn’t run npm run build to create the static assets.

Although if this is a non development deployment, I recommend @justinclift’s script.

Do I need to reinstall centos7?If I need to reinstall centos7, can I just run the setup.sh file after installation?thank you

If you’re doing this in a VM or similiar system where reinstalling CentOS isn’t going to be a bunch of effort, then I’d recommend that just so this follows a 100% known good path. :smile:

If reinstalling CentOS would be painful though… then you’ll probably be ok to just delete the Redash images and containers from your docker instance, then run setup.sh again.

Out of curiosity, are you comfortable reading through shell scripting? If you are… then the setup.sh script itself isn’t too complex. Instead of running it directly, you can run the commands from it one by one manually, which should let you catch anything weird right away. :smile:

Thank you very much. Setup. sh can be used successfully. I am very sorry for the late reply because I am busy preparing for the exam these days.

It’s no worries at all. Glad you got it working.

Good luck with your exams! :smile:

me too.

husky@1.3.1 install /frontend/node_modules/husky
node husky install

husky > setting up git hooks
Can’t find .git, skipping Git hooks installation.
Please check that you’re in a cloned repository or run ‘git init’ to create an empty Git repository and reinstall husky.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})

added 2060 packages from 1094 contributors and audited 96985 packages in 704.498s
found 24 vulnerabilities (17 moderate, 7 high)
run npm audit fix to fix them, or npm audit for details
Removing intermediate container 767f306b2f2c