Home
Support Forums

Vue.js deployement : Command failed - exit code 1


Hello there, I have a problem for couple days to deploy a simple vue.js app. In fact, I just start the project, so I don’t even touch the Vue CLI project.

What I already did :

  • connect my Netlify account to my GitHub repository
  • yarn build in my terminal
  • enter yarn build in deployment settings
  • enter dist in the publishing directory
  • try to change deployment settings, the build command in npm run build, yarn run build…
  • try to delete my node_modules and install again with yarn install.
  • Here my Netlify site name: angry-banach-19f401

  • My logs tell me exit code 1 and non-zero exit code 1, and I don’t really understand the other logs. Someone can help me there ?

First, line 74 :

10:36:10 AM: [4/4] Building fresh packages...
10:38:54 AM: error /opt/build/repo/node_modules/node-sass: Command failed.
10:38:54 AM: Exit code: 110:36:10 AM: [4/4] Building fresh packages...
10:38:54 AM: error /opt/build/repo/node_modules/node-sass: Command failed.
10:38:54 AM: Exit code: 1

And then, line 781 :

10:38:54 AM: Build failed with error code: 1
10:38:54 AM: Error during Yarn install
10:38:54 AM: Build was terminated: Build script returned non-zero exit code: 1
10:38:54 AM: Failing build: Failed to build site

Thank you for your help

Hi @Thib21,

This is yet another node-gyp error. I think, the fix that worked for most of them was one of the following:

  1. Remove node_modules and package-lock.json from the repo.
  2. Use the latest build image.
  3. Use a newer Node version.

Let us know if something works from that.

hello @hrishikesh, thank you for your answser !

Unfortunately, I tried what you said but it doesn’t work. It looks like the same error for me

You could also try setting an environment variable with the name NODE_VERSION and value 14.17.1 - this worked for almost everyone.

I install the last node version : 16.8. Do you think it is for that reason ?

Yes, for some reason 14.17.1 works, 16 doesn’t.

ok I will try to install this version

Is there any chance 14.17.6 works ?

Yeah it should. It’s just a patch version, so I don’t see why not.

Okay, it doesn’t work for this project. But I had some others problems with others projects and this looks like the solution ! Thank you :slight_smile: