Unable to find files without .js extension


I am building an app with HTML, CSS, and TS. I deploy the app on Netlify (https://link-sharing-app1.netlify.app/profile.html).

In my .ts files I import modules like so: import { validateImage } from "../utils/validateImage";
In my development environment, this works well. But as soon as the application is deployed to Netlify, I get errors from the server not being able to find the files in question. If I add the .js file extension, everything works.


    "target": "es6",
    "module": "ES6",
    "outDir": "./public/js",
    "rootDir": "./src",

    "strict": true,

    "moduleResolution": "node",
    "esModuleInterop": true,
    "sourceRoot": "../src",
    "inlineSourceMap": true,

    "skipLibCheck": true,
    "forceConsistentCasingInFileNames": true
  "exclude": ["**/*.test.ts", "**/*.spec.ts", "tests/"]

Does anyone know why this is?

Hi there,

Thanks for reaching out! Can you share the specific errors that you’re seeing? It also looks like the above site may have since been taken down (or had the name changed). Can you confirm? Thanks again!

1 Like