I've been trying to deploy my create-react-app to vercel but keep getting the following error. Everything works locally and even builds with no errors. How can I fix it? I already tried to get variables on vercel project settings and nothing.
I build with npm run build
and do nothing with Yarn, so I don't get it.
14:50:48 511[1/4] Resolving packages
14:50:49 609[2/4] Fetching packages
14:51:06 414info fsevents@2 3 2: The platform "linux" is incompatible with this module
14:51:06 414info "fsevents@2 3 2" is an optional dependency and failed compatibility check Excluding it from installation
14:51:06 431info fsevents@1 2 13: The platform "linux" is incompatible with this module
14:51:06 431info "fsevents@1 2 13" is an optional dependency and failed compatibility check Excluding it from installation
14:51:06 444[3/4] Linking dependencies
14:51:06 446warning " > @testing-library/user-event@12 8 3" has unmet peer dependency "@testing-library/dom@>=7 21 4"
14:51:06 447warning " > react-lottie@1 2 3" has incorrect peer dependency "react@^0 14 7 || ^15 0 0 || ^16 0 0"
14:51:06 451warning "react-scripts > @typescript-eslint/eslint-plugin > tsutils@3 20 0" has unmet peer dependency "typescript@>=2 8 0 || >= 3 2 0-dev || >= 3 3 0-dev || >= 3 4 0-dev || >= 3 5 0-dev || >= 3 6 0-dev || >= 3 6 0-beta || >= 3 7 0-dev || >= 3 7 0-beta"
14:51:20 599[4/4] Building fresh packages
14:51:21 325success Saved lockfile
14:51:21 331Done in 32 90s
14:51:21 551Running "yarn run build"
14:51:21 736yarn run v1 22 10
14:51:21 764$ CI=false && react-scripts build
14:51:23 059Creating an optimized production build
14:51:23 841Browserslist: caniuse-lite is outdated Please run:
14:51:23 842npx browserslist@latest --update-db
14:51:23 842
14:51:23 842Why you should do it regularly:
14:51:23 842https://github com/browserslist/browserslist#browsers-data-updating
14:51:26 498Failed to compile
14:51:26 498
14:51:26 502 /src/components/header/Banner js
14:51:26 502Cannot find file 'C:/Users/gabri/OneDrive/Documentos/React/portifolio/src/assets/img/profile/eu png' in ' /src/components/header'
14:51:26 502
14:51:26 503
14:51:26 526 error Command failed with exit code
14:51:26 526 info Visit https://yarnpkg com/en/docs/cli/run for documentation about this command
14:51:26 542 Error: Command "yarn run build" exited with 1
My package.json
{
"name": "portifolio",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-lottie": "^1.2.3",
"react-scripts": "4.0.3",
"web-vitals": "^1.0.1"
},
"scripts": {
"start": "react-scripts start",
"build": "CI=false && react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
The error message says:
Cannot find file 'C:/Users/gabri/OneDrive/Documentos/React/portifolio/src/assets/img/profile/eu png' in ' /src/components/header'
Check that you're referencing this file properly in your header component.