Relative Content

Tag Archive for reactjsdeploymentnetlify

how to remove such errors to have a successful deployment

6:43:51 PM: npm error syscall open
6:43:51 PM: npm error path /opt/build/repo/package.json
6:43:51 PM: npm error errno -2
6:43:51 PM: npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open ‘/opt/build/repo/package.json’
6:43:51 PM: npm error enoent This is related to npm not being able to find a file.
6:43:51 PM: npm error enoent
6:43:51 PM: npm error A complete log of this run can be found in: /opt/buildhome/.npm/_logs/2024-06-24T13_13_51_476Z-debug-0.log
6:43:51 PM: ​
6:43:51 PM: “build.command” failed
6:43:51 PM: ────────────────────────────────────────────────────────────────
6:43:51 PM: ​
6:43:51 PM: Error message
6:43:51 PM: Command failed with exit code 254: CI= npm run build (https://ntl.fyi/exit-code-254)
6:43:51 PM: ​
6:43:51 PM: Error location
6:43:51 PM: In Build command from Netlify app:
6:43:51 PM: CI= npm run build
6:43:51 PM: ​
6:43:51 PM: Resolved config
6:43:51 PM: build:
6:43:51 PM: command: CI= npm run build
6:43:51 PM: commandOrigin: ui
6:43:51 PM: environment:
6:43:51 PM: – CI
6:43:51 PM: publish: /opt/build/repo
6:43:51 PM: publishOrigin: default
6:43:51 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
6:43:51 PM: Failing build: Failed to build site
6:43:52 PM: Finished processing build request in 11.429s