A new Error: Command "npm run build" exited with 1

Hi every one !
I try to deploy my project on vercel but It doesn’t work.

I tried to :

change my package.json file >
“node”: “>=10.0.0” replace it by “node”: “16.x”,

I’ve also tried to change my settings project in Vercel :
project>settings>Build & Development Settings> Build Command
I’ve override it with : CI=false

I tried to run : vc --cwd build

Do you have any idea ? could you help me please ?

My link to my GitHub repo :

The error found in Vercel :

Error: error:0308010C:digital envelope routines::unsupported
12:58:52.792 at new Hash (node:internal/crypto/hash:71:19)
12:58:52.792 at Object.createHash (node:crypto:133:10)
12:58:52.792 at module.exports (/vercel/path1/node_modules/webpack/lib/util/createHash.js:135:53)
12:58:52.793 at NormalModule._initBuildHash (/vercel/path1/node_modules/webpack/lib/NormalModule.js:417:16)
12:58:52.793 at handleParseError (/vercel/path1/node_modules/webpack/lib/NormalModule.js:471:10)
12:58:52.793 at /vercel/path1/node_modules/webpack/lib/NormalModule.js:503:5
12:58:52.793 at /vercel/path1/node_modules/webpack/lib/NormalModule.js:358:12
12:58:52.793 at /vercel/path1/node_modules/loader-runner/lib/LoaderRunner.js:373:3
12:58:52.793 at iterateNormalLoaders (/vercel/path1/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
12:58:52.794 at iterateNormalLoaders (/vercel/path1/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
12:58:52.794 at /vercel/path1/node_modules/loader-runner/lib/LoaderRunner.js:236:3
12:58:52.794 at context.callback (/vercel/path1/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
12:58:52.794 at /vercel/path1/node_modules/babel-loader/lib/index.js:44:71
12:58:52.818 Error: Command “npm run build” exited with 1

Thank you !

1 Like

Can you try replacing this line:
"build": "frontity build", in your package.json to "build": "node -v && frontity build && node -v" and then lets check the deploy logs to check which Node version it has. Should be 16.x

@liadeveloppement did you solve it? Same issue here.

Hello @jewel , I did have the same error a few days ago. I changed the node version to

 "engines": {
    "node": "16.13.0",
    "npm": ">=6.0.0"

You need to follow the steps when you change the version of Node in a project, like npm install, probably some dependencies will change, and probably some unexpected behavior of functionalities will happen or not.