nuxt / vercel-builder

Vercel Builder for Nuxt
MIT License
645 stars 76 forks source link

Unable to deploy SSR app - bufferutil error #468

Closed inbytesdevteam closed 3 years ago

inbytesdevteam commented 3 years ago

Hi! I can deploy my Nuxt.js app but it's static right now. I want to make it SSR so I added the sample vercel.json in the docs:

{
  "version": 2,
  "builds": [
    {
      "src": "nuxt.config.js",
      "use": "@nuxtjs/vercel-builder"
    }
  ]
}

However, deploy is failing to Vercel with this error:

15:12:48.372    Cloning completed in 2025ms
15:12:48.377    Analyzing source code...
15:12:48.379    Warning: Due to `builds` existing in your configuration file, the Build and Development Settings defined in your Project Settings will not apply. Learn More: https://vercel.link/unused-build-settings
15:12:49.203    Installing build runtime...
15:12:51.820    Build runtime installed: 2616.513ms
15:12:52.576    Looking up build cache...
15:12:52.692    Build cache not found
15:12:53.454    Running with @nuxt/vercel-builder version 0.18.1
15:12:53.455     ----------------- Prepare build ----------------- 
15:12:53.455    Downloading files...
15:12:53.455    Working directory: /vercel/workpath0
15:12:53.460    Using yarn
15:12:53.462    ℹ Prepare build took: 6.235543 ms
15:12:53.462     ----------------- Install devDependencies ----------------- 
15:12:53.692    yarn install v1.22.4
15:12:53.762    [1/5] Resolving packages...
15:12:54.219    [2/5] Fetching packages...
15:13:06.740    info fsevents@2.1.3: The platform "linux" is incompatible with this module.
15:13:06.740    info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
15:13:06.749    info fsevents@1.2.13: The platform "linux" is incompatible with this module.
15:13:06.749    info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
15:13:06.755    [3/5] Linking dependencies...
15:13:06.756    warning "@nuxtjs/markdownit > raw-loader@4.0.2" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
15:13:06.757    warning " > bootstrap@4.5.3" has unmet peer dependency "jquery@1.9.1 - 3".
15:13:06.759    warning " > bootstrap@4.5.3" has unmet peer dependency "popper.js@^1.16.1".
15:13:06.759    warning "bootstrap-vue > portal-vue@2.1.7" has unmet peer dependency "vue@^2.5.18".
15:13:06.759    warning " > eslint-loader@4.0.2" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
15:13:06.759    warning " > eslint-plugin-vue@6.2.2" has incorrect peer dependency "eslint@^5.0.0 || ^6.0.0".
15:13:06.764    warning " > vuelidate-error-extractor@2.4.1" has unmet peer dependency "vue@^2.5.16".
15:13:06.764    warning " > sass-loader@10.1.0" has unmet peer dependency "webpack@^4.36.0 || ^5.0.0".
15:13:17.802    [4/5] Building fresh packages...
15:13:18.137    error /vercel/workpath0/node_modules/bufferutil: Command failed.
15:13:18.137    Exit code: 127
15:13:18.137    Command: node-gyp-build
15:13:18.137    Arguments: 
15:13:18.137    Directory: /vercel/workpath0/node_modules/bufferutil
15:13:18.137    Output:
15:13:18.137    /bin/sh: node-gyp-build: command not found
15:13:18.137    info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
15:13:20.253    Error: Command "yarn install" exited with 127
15:13:22.973    Done with "nuxt.config.js"

If it helps, I use yarn as my package manager right now. The bufferutil and node-gyp-build commands seem to fail. Is there any reason why this is the case?

danielroe commented 3 years ago

Duplicate of https://github.com/nuxt/vercel-builder/issues/371

inbytesdevteam commented 3 years ago

Hi @danielroe, it seems like this is different from #371 since that is for bcrypt, this one is for bufferutil. Is there any solution for this?

inbytesdevteam commented 3 years ago

Just an update - using npm instead of yarn solved the issue for me! I'm not entirely sure why, but I tried recreating the project with npm and it worked.