【问题标题】:NPM error while building Elixir/Phoenix code using Gitlab CI Pipe使用 Gitlab CI Pipe 构建 Elixir/Phoenix 代码时出现 NPM 错误
【发布时间】:2022-01-20 18:53:10
【问题描述】:

我们正在使用 Gitlab CI 管道构建和部署我们的 Elixir/Phoenix 代码。

一切正常,但今天我们的构建日志开始抛出 npm 错误,无法进一步构建代码

在我们的构建日志中出现以下错误

#21 1.039 npm ERR! dot-prop not accessible from stylehacks:postcss-selector-parser
852#21 1.044 
853#21 1.044 npm ERR! A complete log of this run can be found in:
854#21 1.045 npm ERR!     /root/.npm/_logs/2021-12-18T00_00_39_802Z-debug.log
855#21 ERROR: executor failed running [/bin/sh -c npm --prefix ./assets ci --progress=false --no-audit --loglevel=error]: exit code: 1
856------
857 > [build 12/17] RUN npm --prefix ./assets ci --progress=false --no-audit --loglevel=error:
858------
859executor failed running [/bin/sh -c npm --prefix ./assets ci --progress=false --no-audit --loglevel=error]: exit code: 1

860
Cleaning up file based variables
00:01
861ERROR: Job failed: exit code 1

我们甚至尝试更新我们的 postcss 包,但没有成功

非常感谢任何帮助或指点。

【问题讨论】:

  • /root/.npm/_logs/2021-12-18T00_00_39_802Z-debug.log 的内容在这里会有很大帮助。
  • 感谢您的回复。我们现在可以通过将 RUN npm --prefix ./assets ci --progress=false --no-audit --loglevel=error 更改为 RUN npm --prefix ./assets install --progress=false 来让它工作。 no-audit --loglevel=error 将关闭帖子

标签: npm elixir gitlab-ci


【解决方案1】:

能够通过修改 npm 的命令来修复构建问题

更改的代码行

来自

RUN npm --prefix ./assets ci --progress=false --no-audit --loglevel=error

RUN npm --prefix ./assets install --progress=false --no-audit --loglevel=error

【讨论】:

    猜你喜欢
    • 2020-04-26
    • 2017-02-28
    • 2022-01-23
    • 2020-10-17
    • 1970-01-01
    • 1970-01-01
    • 2015-09-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多