node.js - Command failed with exit code 1: CI= npm run build

node.js – Command failed with exit code 1: CI= npm run build

node.js – Command failed with exit code 1: CI= npm run build

Generally, libraries that choose to fail on warnings presume their users will want to fix the issues causing the warnings. If this isn’t practical for your use case, you can override the CI variable by adding CI= to the beginning of your site build command. For example:

CI= npm run build

This fixed my own similar problem

I had a similar error and I found the following has fixed it.

First in your package.json you have to change your build script to build: react-scripts build

It should be:

scripts: {
  test: echo Error: no test specified && exit 1,
  start: ./node_modules/.bin/netlify-lambda serve src,
  build: react-scripts build
},

And in your netlify deploy settings change to CI= npm build.

And make sure your publish folder exists.

node.js – Command failed with exit code 1: CI= npm run build

I also had the same problem.

But since I added some –openssl-legacy-provider in the package.json file before (in order to overcome the React version incompatibility problem), I just deleted them, then the problems gone, even CI= was unnecessary.

Related posts on Node js :

Leave a Reply

Your email address will not be published.