首页 > 解决方案 > 气流网络服务器主页不断加载并在 html 页面中显示错误

问题描述

我已经使用https://github.com/apache/airflow/blob/master/INSTALL安装了 Airflow - 2.0.0.dev0

并解决了所有依赖问题。

现在,以下三件事可以正常工作而不会引发错误```

airflow db init
airflow scheduler
airflow webserver -p 8080

But on airflow webserver homepage, it's showing loading continuously(in *Recent Tasks*, *Last Run* and *DAG Runs* columns)

On browser console, it is showing these errors

>home:46 GET http://localhost:8080/static/ net::ERR_ABORTED 404 (NOT FOUND)
>home:2782 GET http://localhost:8080/static/ net::ERR_ABORTED 404 (NOT FOUND)
>home:2767 GET http://localhost:8080/static/appbuilder/fonts/glyphicons-halflings-regular.woff2 net::ERR_ABORTED 404 (NOT FOUND)
>home:2782 GET http://localhost:8080/static/ net::ERR_ABORTED 404 (NOT FOUND)
>home:2793 GET http://localhost:8080/static/ net::ERR_ABORTED 404 (NOT FOUND)
>home:2794 .........
>home:2795 .........
>home:2796 .........
>home:2797 GET http://localhost:8080/static/ net::ERR_ABORTED 404 (NOT FOUND)
>home:2854 Uncaught TypeError: $input.typeahead is not a function
    at home:2854



标签: airflow-schedulerairflow

解决方案


您可能缺少 NPM 依赖项,请从根目录运行以下命令:

./airflow/www/compile_assets.sh

或者

if [[ -d airflow/www/static/dist ]]; then
  rm -f airflow/www/static/dist/*
fi

cd airflow/www/
npm install
npm run build
cd ../..

推荐阅读