[quote=“[Support Guide] Netlify app builds locally but fails on deploy (case sensitivity), post:1, topic:10754”]
ld see any problems related to t
[/quote]
i did this, renaming the file and pushing to github, but i am still getting the same error.
9:36:40 AM: Netlify Build
9:36:40 AM: ────────────────────────────────────────────────────────────────
9:36:40 AM:
9:36:40 AM: ❯ Version
9:36:40 AM: @netlify/build 29.31.1
9:36:40 AM:
9:36:40 AM: ❯ Flags
9:36:40 AM: baseRelDir: true
9:36:40 AM: buildId: 658c44651673380007356470
9:36:40 AM: deployId: 658c44651673380007356472
9:36:40 AM:
9:36:40 AM: ❯ Current directory
9:36:40 AM: /opt/build/repo
9:36:40 AM:
9:36:40 AM: ❯ Config file
9:36:40 AM: No config file was defined: using default values.
9:36:40 AM:
9:36:40 AM: ❯ Context
9:36:40 AM: production
9:36:40 AM:
9:36:40 AM: Build command from Netlify app
9:36:40 AM: ────────────────────────────────────────────────────────────────
9:36:40 AM:
9:36:40 AM: $ npm run build
9:36:41 AM: > loomoneers-webapp-cap@0.0.0 build
9:36:41 AM: > vite build
9:36:41 AM: vite v4.5.0 building for production...
9:36:41 AM: transforming...
9:36:42 AM: Failed during stage "building site": Build script returned non-zero exit code: 2
9:36:42 AM: ✓ 24 modules transformed.
9:36:42 AM: ✓ built in 552ms
9:36:42 AM: Could not resolve "../views/members/alex.vue" from "src/router/router.js"
9:36:42 AM: file: /opt/build/repo/src/router/router.js
9:36:42 AM: error during build:
9:36:42 AM: RollupError: Could not resolve "../views/members/alex.vue" from "src/router/router.js"
9:36:42 AM: at error (file:///opt/build/repo/node_modules/rollup/dist/es/shared/node-entry.js:2287:30)
9:36:42 AM: at ModuleLoader.handleInvalidResolvedId (file:///opt/build/repo/node_modules/rollup/dist/es/shared/node-entry.js:24860:24)
9:36:42 AM: at file:///opt/build/repo/node_modules/rollup/dist/es/shared/node-entry.js:24822:26
9:36:42 AM:
9:36:42 AM: "build.command" failed
9:36:42 AM: ────────────────────────────────────────────────────────────────
9:36:42 AM:
9:36:42 AM: Error message
9:36:42 AM: Command failed with exit code 1: npm run build (https://ntl.fyi/exit-code-1)
9:36:42 AM:
9:36:42 AM: Error location
9:36:42 AM: In Build command from Netlify app:
9:36:42 AM: npm run build
9:36:42 AM:
9:36:42 AM: Resolved config
9:36:42 AM: build:
9:36:42 AM: command: npm run build
9:36:42 AM: commandOrigin: ui
9:36:42 AM: publish: /opt/build/repo/dist
9:36:42 AM: publishOrigin: ui
9:36:42 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
9:36:42 AM: Failing build: Failed to build site
9:36:42 AM: Finished processing build request in 35.552s
Hi, @sonnofmann. Hrishikesh and I can see your repo because we work at Netlify. This means we can see Netlify internals so we know what repo this is for. No one else on the support forum (besides people working at Netlify) can see this.
Also, we cannot see private repos but this repo is public so we can inspect it on GitHub.
The issue here is that Linux filesystems are case-sensitive. You are referencing the file like this in the file src/router/router.js:
'../views/members/alex.vue'
However, the actual relative file path is this (with an upper-case “M” in “Members”):
src/views/Members/alex.vue
This means it must be referenced as:
'../views/Members/alex.vue'
It is still case-sensitivity. The case of the letters for entire path must match. You changed “Alex.vue” to “alex.vue” but “Members” is still mixed case.
thank you! i was able to fix it and get it deployed, to where it says Production: main@915286a published
I tried adding a netlify.toml file, however, i am still getting page not found when i click on Open production deploy
Hi, @sonnofmann. The “page not found” is happening because there is no index.html file in the base of the publish directory. You can confirm this by downloading the deploy.
As to why that file is missing, that I do not know. I know that it is missing but not why,
There is a favicon in that directory and requests to that URL are working. Please note, I’ve redacted the site name below as you haven’t shared it publicly yet (and I won’t unless you do so first):
So, the site is working. The issue now is that there is no HTML file for the base path (/). Again, the HTML file for the base path of / is called index.html for historical reasons.
If you add an index.html file, the 404s should stop happening for the base path URL as well. If there are other questions about this, please let us know.
i built my webapp using Vite and VueJS, could the structure be the reason why the index.html file is missing? because i have that file in my repo and can locally launch the webapp.