Hi @Ramji_R , the error is happening on the quoted lines below.
the path file:///PatientNextGen/apps/clinical-content/common/gql/redirect". will work locally but will not work on production.
The file should be located in your project and you have to specify a relative path to your project.
Hi @Ramji_R, relative paths is not specific to Netlify but mostly application development or operating system file management on servers via terminal consoles e.t.c.
So in terms of an example let’s assume you have your application in a folder called PatientNextGen.
If your main.ts is in the root of PatientNextGen, then the relative path to the redirect.ts file will be ./apps/clinical-content/common/gql/redirect.ts
If the redirect.ts is located elsewhere on your computer you can make a copy of it in your project folder PatientNextGen
So an example of importing the variables or functions from the module is below.
import { someFunction } from './apps/clinical-content/common/gql/redirect.ts';
// Use the imported function
someFunction();
Are you sure the path is correct? I don’t believe @clarnx’s answer was meant to be copied as it is (or if it was, it’s not correct). I assume @clarnx was merely suggesting you to check your relative imports and make sure the paths are correct, and what they provided was an example.
Your screenshot is a little cropped, so I don’t know if the apps directory is within PatientNextGen or not. If it is, your original import statement was correct, however, you might be affected by:
If that’s not it, please share your complete project structure.