【发布时间】:2021-09-02 10:40:03
【问题描述】:
我在将我的静态 Nuxt 站点(版本 2.15.8)部署到 Netlify 时遇到问题。当我推送到生成构建的 git 分支时,构建失败并出现以下错误:
────────────────────────────────────────────────────────────────
11:33:46 AM: 1. Build command from Netlify app
11:33:46 AM: ────────────────────────────────────────────────────────────────
11:33:46 AM:
11:33:46 AM: $ npm run generate
11:33:46 AM: > mydomain.co.uk@1.0.0 generate
11:33:46 AM: > nuxt generate
11:33:56 AM: node: ../src/coroutine.cc:134: void* find_thread_id_key(void*): Assertion `thread_id_key != 0x7777' failed.
Aborted
11:33:56 AM:
11:33:56 AM: ────────────────────────────────────────────────────────────────
11:33:56 AM: "build.command" failed
11:33:56 AM: ────────────────────────────────────────────────────────────────
11:33:56 AM:
11:33:56 AM: Error message
11:33:56 AM: Command failed with exit code 134: npm run generate
11:33:56 AM:
11:33:56 AM: Error location
11:33:56 AM: In Build command from Netlify app:
11:33:56 AM: npm run generate
11:33:56 AM:
11:33:56 AM: Resolved config
11:33:56 AM: build:
11:33:56 AM: command: npm run generate
11:33:56 AM: commandOrigin: ui
11:33:56 AM: publish: /opt/build/repo/dist
11:33:56 AM: publishOrigin: ui
11:33:56 AM: Caching artifacts
11:33:56 AM: Started saving node modules
11:33:56 AM: Finished saving node modules
11:33:56 AM: Started saving build plugins
11:33:56 AM: Finished saving build plugins
11:33:56 AM: Started saving yarn cache
11:34:00 AM: Finished saving yarn cache
11:34:00 AM: Started saving pip cache
11:34:00 AM: Finished saving pip cache
11:34:00 AM: Started saving emacs cask dependencies
有人知道为什么会这样吗?
【问题讨论】:
-
它在本地工作吗?
-
@kissu 谢谢。我发现了问题,Netlify 中使用了 Node 16,但不支持。因此,我在我的 netlify.toml 配置文件中添加了一个 NODE_VERSION 变量并将其设置为 15.14.0。这解决了问题
-
也许更喜欢使用 LTS aka v14。