【问题标题】:Apache Zeppelin 0.8.0-Snapshot "Failed to exec build:dist" ( Building Zeppelin: web Application)Apache Zeppelin 0.8.0-Snapshot “无法执行 build:dist”(构建 Zeppelin:web 应用程序)
【发布时间】:2018-08-31 18:44:22
【问题描述】:

我正在从 maven 构建 Apache Zeppelin 0.8.0,我必须使用 Zeppelin 提供的高级功能,例如Apache Zeppelin 笔记本授权允许“跑步者” 但是我正在尝试使用不同版本的 node 和 npm,但在 mvn clean package -DskipTests 构建 Building Zeppelin: web Application 期间仍然出现以下错误。
以下是调试日志中的错误日志:/root/.npm/_logs/2018-03-22T10_38_10_265Z-debug.log

还有这个新版本(0.8.0)什么时候发布?

1 verbose cli [ '/root/zeppelin/zeppelin-web/node/node',
1 verbose cli   '/root/zeppelin/zeppelin-web/node/node_modules/npm/bin/npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'build:dist' ]
2 info using npm@5.5.1
3 info using node@v8.9.3
4 verbose run-script [ 'prebuild:dist', 'build:dist', 'postbuild:dist' ]
5 info lifecycle zeppelin-web@0.0.0~prebuild:dist: zeppelin-web@0.0.0
6 info lifecycle zeppelin-web@0.0.0~build:dist: zeppelin-web@0.0.0
7 verbose lifecycle zeppelin-web@0.0.0~build:dist: unsafe-perm in lifecycle true
8 verbose lifecycle zeppelin-web@0.0.0~build:dist: PATH: /root/zeppelin/zeppelin-web/node/node_modules/npm/bin/node-gyp-bin:/root/zeppelin/zeppelin-web/node_modules/.bin:/root/zeppelin/zeppel$9 verbose lifecycle zeppelin-web@0.0.0~build:dist: CWD: /root/zeppelin/zeppelin-web
10 silly lifecycle zeppelin-web@0.0.0~build:dist: Args: [ '-c',
10 silly lifecycle   'npm-run-all prebuild && grunt pre-webpack-dist && webpack && grunt post-webpack-dist' ]
11 silly lifecycle zeppelin-web@0.0.0~build:dist: Returned: code: 3  signal: null
12 info lifecycle zeppelin-web@0.0.0~build:dist: Failed to exec build:dist script
13 verbose stack Error: zeppelin-web@0.0.0 build:dist: `npm-run-all prebuild && grunt pre-webpack-dist && webpack && grunt post-webpack-dist`
13 verbose stack Exit status 3
13 verbose stack     at EventEmitter.<anonymous> (/root/zeppelin/zeppelin-web/node/node_modules/npm/node_modules/npm-lifecycle/index.js:280:16)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at EventEmitter.emit (events.js:214:7)
13 verbose stack     at ChildProcess.<anonymous> (/root/zeppelin/zeppelin-web/node/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at ChildProcess.emit (events.js:214:7)
13 verbose stack     at maybeClose (internal/child_process.js:925:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid zeppelin-web@0.0.0
15 verbose cwd /root/zeppelin/zeppelin-web
16 verbose Linux 4.4.0-87-generic
17 verbose argv "/root/zeppelin/zeppelin-web/node/node" "/root/zeppelin/zeppelin-web/node/node_modules/npm/bin/npm-cli.js" "run" "build:dist"
18 verbose node v8.9.3
19 verbose npm  v5.5.1
20 error code ELIFECYCLE
21 error errno 3
22 error zeppelin-web@0.0.0 build:dist: `npm-run-all prebuild && grunt pre-webpack-dist && webpack && grunt post-webpack-dist`
22 error Exit status 3
23 error Failed at the zeppelin-web@0.0.0 build:dist script.

【问题讨论】:

  • 如果我不得不猜测,你的 NPM 或 Node 版本很糟糕。如果你想询问发布,有一个 Zeppelin 邮件列表,不是吗? zeppelin.apache.org/community.html

标签: apache-zeppelin


【解决方案1】:

此问题可能是由于以 root 用户身份构建 Zeppelin 但无法以 root 用户身份运行“bower”。

尝试编辑下面的文件,为“postinstall”、“build:dist”和“build:ci”构建步骤添加bower install --silent --allow-root,然后重新构建。

编辑zeppelin/zeppelin-web/package.json:

  "scripts": {
    "clean": "rimraf dist && rimraf .tmp",
    "postinstall": "bower install --silent --allow-root",
    "prebuild": "npm-run-all clean lint:once",
    "build:dist": "npm-run-all prebuild && bower install --silent --allow-root && grunt pre-webpack-dist && webpack && grunt post-webpack-dist",
    "build:ci": "npm-run-all prebuild && bower install --silent --allow-root && grunt pre-webpack-ci && webpack && grunt post-webpack-dist",

【讨论】:

    【解决方案2】:

    您需要使用非 root 用户运行 maven build。如果与 root 用户一起使用,Bower 将中断安装。

    使用 root 执行任何管理任务(先决条件),将 git repo 放在用户空间下并与用户一起构建它。

    以下内容应该适用于普通用户:

    #Prerequisites
    sudo yum update -y
    sudo yum install -y java-1.8.0-openjdk-devel git gcc-c++ make
    #Using NODE.JS Version 8 (Version 10 / Actual also works).
    curl -sL https://rpm.nodesource.com/setup_8.x | sudo -E bash -
    sudo yum install -y nodejs fontconfig
    curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d    /yarn.repo
    sudo yum install -y yarn
    npm config set strict-ssl false
    npm install -g bower
    
    #Maven Enviroment
    mkdir /usr/local/maven
    cd /usr/local/maven
    wget http://apache.rediris.es/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz
    tar xzvf apache-maven-3.5.4-bin.tar.gz --strip-components=1
    sudo ln -s /usr/local/maven/bin/mvn /usr/local/bin/mvn
    #Configure Maven to use more resources
    export MAVEN_OPTS="-Xmx2g -XX:MaxPermSize=1024m"
    
    #Proxy Configs
    #git config --global http.proxy http://your.company.proxy:port git config --global
    #npm config set proxy http://your.company.proxy:8080
    #npm config set https-proxy http://your.company.proxy:8080
    #nano ~/.bowerrc
    #{
    #"proxy":"http ://:
    #", "https-proxy":"http ://:
    #"
    #}
    
    #Zeppelin Install
    sudo useradd zeppelin
    sudo su zeppelin
    cd /home/zeppelin
    git clone https://github.com/apache/zeppelin.git
    cd zeppelin
    mvn clean package -Dmaven.test.skip=true
    

    希望对您有所帮助。

    【讨论】:

      猜你喜欢
      • 2018-08-20
      • 2017-01-14
      • 2019-06-10
      • 2016-12-16
      • 2018-01-16
      • 2016-11-21
      • 2017-06-18
      • 2017-01-19
      • 2018-02-14
      相关资源
      最近更新 更多