Build error with simple ReactJS app on CF Pages

Hello. I'm new to Cloudflare Pages. I am attempting to deploy my react app onto it and have successfully connected. However, on deployment, I am getting the following error:
...
19:20:20.496 Success: Finished cloning repository files
19:20:21.268 Detected the following tools from environment: [email protected], [email protected]
19:20:21.269 Installing project dependencies: npm clean-install --progress=false
19:20:23.952 npm ERR! code EUSAGE
19:20:23.957 npm ERR!
19:20:23.958 npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
19:20:23.958 npm ERR!
19:20:23.959 npm ERR! Invalid: lock file's [email protected] does not satisfy [email protected]
...
19:20:23.961 npm ERR!
19:20:23.961 npm ERR! Clean install a project
19:20:23.962 npm ERR!
19:20:23.962 npm ERR! Usage:
19:20:23.962 npm ERR! npm ci
19:20:23.962 npm ERR!
...
19:20:23.963 npm ERR!
19:20:23.964 npm ERR! Run "npm help ci" for more info
19:20:23.964
19:20:23.964 npm ERR! A complete log of this run can be found in: /opt/buildhome/.npm/_logs/2023-12-13T18_20_22_190Z-debug-0.log
19:20:23.973 Error: Exit with error code: 1
19:20:23.973 at ChildProcess.<anonymous> (/snapshot/dist/run-build.js)
19:20:23.973 at Object.onceWrapper (node:events:652:26)
19:20:23.974 at ChildProcess.emit (node:events:537:28)
19:20:23.974 at ChildProcess._handle.onexit (node:internal/child_process:291:12)
19:20:23.980 Failed: build command exited with code: 1
19:20:25.043 Failed: error occurred while running build command
...
19:20:20.496 Success: Finished cloning repository files
19:20:21.268 Detected the following tools from environment: [email protected], [email protected]
19:20:21.269 Installing project dependencies: npm clean-install --progress=false
19:20:23.952 npm ERR! code EUSAGE
19:20:23.957 npm ERR!
19:20:23.958 npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
19:20:23.958 npm ERR!
19:20:23.959 npm ERR! Invalid: lock file's [email protected] does not satisfy [email protected]
...
19:20:23.961 npm ERR!
19:20:23.961 npm ERR! Clean install a project
19:20:23.962 npm ERR!
19:20:23.962 npm ERR! Usage:
19:20:23.962 npm ERR! npm ci
19:20:23.962 npm ERR!
...
19:20:23.963 npm ERR!
19:20:23.964 npm ERR! Run "npm help ci" for more info
19:20:23.964
19:20:23.964 npm ERR! A complete log of this run can be found in: /opt/buildhome/.npm/_logs/2023-12-13T18_20_22_190Z-debug-0.log
19:20:23.973 Error: Exit with error code: 1
19:20:23.973 at ChildProcess.<anonymous> (/snapshot/dist/run-build.js)
19:20:23.973 at Object.onceWrapper (node:events:652:26)
19:20:23.974 at ChildProcess.emit (node:events:537:28)
19:20:23.974 at ChildProcess._handle.onexit (node:internal/child_process:291:12)
19:20:23.980 Failed: build command exited with code: 1
19:20:25.043 Failed: error occurred while running build command
Please find my build configs in the image. I am able to build the my project locally. I am running on node v18.13.0 and npm 9.6.4 Thanks in advance!
No description
1 Reply
BigFungus
BigFungusOP13mo ago
I have not found the root cause of the error but found a workaround: I set the hosting linux server with an earlier version of node 12.18.0 as opposed to node 18.17.1.
Want results from more Discord servers?
Add your server