命令失败,退出代码 134:npm rungenerate

Has*_*man 8 continuous-integration node.js vue.js netlify nuxt.js

我正在尝试将我的 nuxt js 项目部署到 netlify。安装部分工作正常,但在构建过程中返回错误。

\n

我尝试搜索谷歌,但找不到解决此问题的任何方法。

\n

我也尝试过这个命令CI= npm run generate

\n
3:16:42 PM: $ npm run generate\n3:16:43 PM: > portfolio@1.0.0 generate\n3:16:43 PM: > nuxt generate\n3:16:50 PM: node: ../src/coroutine.cc:134: void* find_thread_id_key(void*): Assertion `thread_id_key != 0x7777' failed.\nAborted\n3:16:50 PM: \xe2\x80\x8b\n3:16:50 PM: \xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\n3:16:50 PM:   "build.command" failed                                        \n3:16:50 PM: \xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\n3:16:50 PM: \xe2\x80\x8b\n3:16:50 PM:   Error message\n3:16:50 PM:   Command failed with exit code 134: npm run generate\n3:16:50 PM: \xe2\x80\x8b\n3:16:50 PM:   Error location\n3:16:50 PM:   In Build command from Netlify app:\n3:16:50 PM:   npm run generate\n3:16:50 PM: \xe2\x80\x8b\n3:16:50 PM:   Resolved config\n3:16:50 PM:   build:\n3:16:50 PM:     command: npm run generate\n3:16:50 PM:     commandOrigin: ui\n3:16:50 PM:     publish: /opt/build/repo/dist\n3:16:50 PM:     publishOrigin: ui\n3:16:50 PM: Caching artifacts\n3:16:50 PM: Started saving node modules\n3:16:50 PM: Finished saving node modules\n3:16:50 PM: Started saving build plugins\n3:16:50 PM: Finished saving build plugins\n3:16:50 PM: Started saving pip cache\n3:16:50 PM: Finished saving pip cache\n3:16:50 PM: Started saving emacs cask dependencies\n3:16:50 PM: Finished saving emacs cask dependencies\n3:16:50 PM: Started saving maven dependencies\n3:16:50 PM: Finished saving maven dependencies\n3:16:50 PM: Started saving boot dependencies\n3:16:50 PM: Finished saving boot dependencies\n3:16:50 PM: Started saving rust rustup cache\n3:16:50 PM: Finished saving rust rustup cache\n3:16:50 PM: Started saving go dependencies\n3:16:50 PM: Finished saving go dependencies\n3:16:52 PM: Build failed due to a user error: Build script returned non-zero exit code: 2\n3:16:52 PM: Creating deploy upload records\n3:16:52 PM: Failing build: Failed to build site\n3:16:52 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2\n3:16:52 PM: Finished processing build request in 1m34.230804646s\n\n
Run Code Online (Sandbox Code Playgroud)\n

这是 Nuxt 配置 -\n我的目标是构建一个静态站点。您可能会猜到这是我的作品集网站。我正在努力完善我的作品集以找到更好的工作。

\n

nuxt.config.js

\n
export default {\n  // Target: https://go.nuxtjs.dev/config-target\n  target: 'static',\n\n  // Global page headers: https://go.nuxtjs.dev/config-head\n  head: {\n    title: 'Hasibur',\n    htmlAttrs: {\n      lang: 'en'\n    },\n    meta: [\n      { charset: 'utf-8' },\n      { name: 'viewport', content: 'width=device-width, initial-scale=1' },\n      { hid: 'description', name: 'description', content: '' },\n      { name: 'format-detection', content: 'telephone=no' }\n    ],\n    link: [\n      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }\n    ]\n  },\n\n  // Global CSS: https://go.nuxtjs.dev/config-css\n  css: [\n    '@/assets/scss/main.scss'\n  ],\n\n  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins\n  plugins: [\n    { src: '~/plugins/components.js', mode: 'client' },\n    { src: '~/plugins/fontawesome.js', mode: 'client' },\n  ],\n\n  // Auto import components: https://go.nuxtjs.dev/config-components\n  components: true,\n\n  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules\n  buildModules: [\n    // https://go.nuxtjs.dev/tailwindcss\n    '@nuxtjs/tailwindcss',\n  ],\n\n  // Modules: https://go.nuxtjs.dev/config-modules\n  modules: [\n    // https://go.nuxtjs.dev/axios\n    '@nuxtjs/axios',\n  ],\n\n  // Axios module configuration: https://go.nuxtjs.dev/config-axios\n  axios: {},\n\n  // Build Configuration: https://go.nuxtjs.dev/config-build\n  build: {\n  }\n}\n\n
Run Code Online (Sandbox Code Playgroud)\n

小智 7

我刚刚遇到了同样的问题,并通过这个问题解决了它。问题似乎出在纤维上。

我采取的修复步骤:

  1. 卸载光纤:npm uninstall fibers
  2. 删除package-lock.jsonnode_modules/
  3. 再次安装包:npm install

仅仅从中删除纤维package.json是不够的,因为 Netlify 似乎仍然可以在package-lock.json.