superset github 源码windows 编译安装 问题记录

本文详细记录了在Windows上安装Superset的步骤,包括配置Python环境、手动下载缺失的pip库、安装前端环境Node.js、使用国内镜像加速编译前端静态文件,以及解决jsx编译问题的方法,特别提到了最新版Superset缺少.babelrc文件的解决方案。
摘要由CSDN通过智能技术生成

一、安装python环境

安装 python 一定要看superset 支持的python版本

另外环境变量的设置,这个就不特地说明,请百度

二、pip安装相关库

在安装的过程中比较容易出现whl库缺少的问题

可到https://www.lfd.uci.edu/~gohlke/pythonlibs/上查找到对应的库文件手动下载,通过pip install XXX 手动安装

三、安装前端环境 node

 

四、编译前端静态文件

编译静态文件时,需要npm install 

npm install 的时候要记得用成国内镜像服务,

相对来说会快点,事实我这边ping 域名,以我自己本地网络才说,国内镜像是官方的4倍

最新superset有一个比较严重的问题

就是在jsx文件编译不过

我通过旧版本对比发现

旧版本中存在.babelrc 文件

但是最新版本不存在

解决方案:

代码片段

/* eslint-disable no-console */
/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
const fs = require('fs');
const path = require('path');
const webpack = require('webpack');
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const SpeedMeasurePlugin = require('speed-measure-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');
const ManifestPlugin = require('webpack-manifest-plugin');
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
const parsedArgs = require('yargs').argv;
const getProxyConfig = require('./webpack.proxy-config');
const packageConfig = require('./package.json');

// input dir
const AP
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值