I have a monday item view app that uses the react quickstart starter code.
The app runs locally and builds locally without any issues, but when trying to deploy the app to Cloudflare, I’m getting the following error during the build step:
14:11:08.264 npm ERR! code 1
14:11:08.266 npm ERR! path /opt/buildhome/repo/node_modules/@mondaycom/apps-cli
14:11:08.272 npm ERR! command failed
14:11:08.277 npm ERR! command sh -c patch-package
14:11:08.283 npm ERR! patch-package 8.0.0
14:11:08.288 npm ERR! Applying patches...
14:11:08.293 npm ERR! Error: Patch file found for package parse-gitignore which is not present at node_modules/parse-gitignore
14:11:08.299 npm ERR! ---
14:11:08.304 npm ERR! patch-package finished with 1 error(s).
14:11:08.329
14:11:08.334 npm ERR! A complete log of this run can be found in: /opt/buildhome/.npm/_logs/2024-06-26T18_10_31_329Z-debug-0.log
14:11:08.369 Error: Exit with error code: 1
14:11:08.374 at ChildProcess.<anonymous> (/snapshot/dist/run-build.js)
14:11:08.375 at Object.onceWrapper (node:events:652:26)
14:11:08.375 at ChildProcess.emit (node:events:537:28)
14:11:08.380 at ChildProcess._handle.onexit (node:internal/child_process:291:12)
14:11:08.385 Failed: build command exited with code: 1
14:11:09.667 Failed: error occurred while running build command
The parse-gitignore node module is generated locally during the build process, so I don’t know what’s going on in the Cloudflare environment that’s causing the parse-gitignore node module to not be generated.
This is my package.json file:
{
"name": "monday-react-quickstart-app",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "npm run stop && concurrently \"npm run server\" \"npm run expose\"",
"build": "react-scripts build",
"expose": "mapps tunnel:create -p 8301",
"server": "react-scripts start",
"test": "react-scripts test",
"eject": "react-scripts eject",
"stop": "kill-port 8301 && kill-port 4049 && kill-port 4040"
},
"dependencies": {
"@mondaycom/apps-sdk": "^3.0.11",
"monday-sdk-js": "^0.5.5",
"monday-ui-react-core": "^2.115.0"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@mondaycom/apps-cli": "^3.6.1",
"concurrently": "^5.2.0",
"cross-port-killer": "^1.4.0",
"eslint-config-react-app": "^7.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "^5.0.1",
"sass": "^1.54.8"
}
}