Netlify deployment issue

Hey,

I've been deploying this project just fine 2 weeks ago but now it suddenly doesn't work.

I did re-organize my component folder but I am not sure if this is what caused it, checked the imports 10 times and everything seems fine (it works locally).

Error:
3:23:39 PM: $ npm run build
3:23:39 PM: > portfolio@0.2.0 build
3:23:39 PM: > tsc && vite build
3:23:41 PM: src/components/content/contentblock/ContentBlock.tsx(11,32): error TS2307: Cannot find module '../pages/projects/ProjectPageWrapper' or its corresponding type declarations.
3:23:41 PM: src/components/content/pages/Projects/ProjectPageWrapper.tsx(3,31): error TS2307: Cannot find module './projectnavigation/ProjectNavigation' or its corresponding type declarations.
3:23:41 PM: ​
3:23:41 PM:   "build.command" failed   
3:41:52 PM:   Error message
3:41:52 PM:   Command failed with exit code 2: npm run build (https://ntl.fyi/exit-code-2)
3:41:52 PM: ​
3:41:52 PM:   Error location
3:41:52 PM:   In build.command from netlify.toml:
3:41:52 PM:   npm run build
3:41:52 PM: ​
3:41:52 PM:   Resolved config
3:41:52 PM:   build:
3:41:52 PM:     base: /opt/build/repo
3:41:52 PM:     command: npm run build
3:41:52 PM:     commandOrigin: config
3:41:52 PM:     publish: /opt/build/repo/dist
3:41:52 PM:     publishOrigin: config
3:41:52 PM:   redirects:
3:41:53 PM:     - from: /*
      status: 200
      to: /index.html
  redirectsOrigin: config
Caching artifacts                                     


I looked through my Github history to double check, but I haven't changed my package.json or netlify.toml at all, nor any settings on Netlify.

This project is React with Vite & TypeScript.

My netlify.toml:
[build]
    command = "npm run build"
    publish = "/dist"
    base = "/"

[[redirects]]
    from = "/*"
    to = "/index.html"
    status = 200
Was this page helpful?